similar to: ActionMailer and url_for in helper methods

Displaying 20 results from an estimated 3000 matches similar to: "ActionMailer and url_for in helper methods"

2005 Mar 06
2
Using url_for in ActionMailer templates
Hi All I am just adding some basic e-mail notices to my Rails app using ActionMailer, and have one small issue. I want to provide a confirmation URL to users who sign up for an account. I can obviously just hardcode the URL and append the confirmation code to it, but I''d much rather be able to use something like: url_for(:controller => ''authentication'', :action
2011 Jan 17
3
Getting Hostname in mailer view
Hi everyone, I need to build a url in my mails view. For restfull resources I can use routing and "..._url" target. But for custom url I don''t know how I get the hostname of my web app. I didn''t know how I can get get the value specified on config.action_mailer.default_url_options = {:host => "here_my_host_i_want_get" } Thanks for reply Vincent --
2010 Mar 02
1
localized host in ActionMailer Views
Hi, I''ve got some domains , lets say example.com and example.de and I want that the link in a ActionMailerView contains the correct localized host e.g. with <%= @root_url %> . Currently the host is set in the environment.rb with "config.action_mailer.default_url_options = { :host => "example.com" }". How can I set the host dynamically and localized?
2008 Sep 02
3
Unable to set default_url_options[:host] for Action Mailer
I am attempting to provide ActionMailer with the request host needed to generate a url. Here is my code: In config/environments/development.rb config.action_mailer.default_url_options = { :host => "development_url.com" } and in config/environments/production.rb config.action_mailer.default_url_options = { :host => "production_url.com" } When I run the above code
2011 Feb 05
1
ActionMailer::Base.default_url_options
Hi, I want so set a default url for ActionMailer. I know, ActionMailer::Base.default_url_options is deprecated, so I use config.action_mailer.default_url_options = { :host => "localhost" } in my environments (test.rb, production.rb, ...). The problem is, I get a deprecation error and rails won''t start. I have no solution... Any hints for me? Testing started at
2007 Dec 21
3
Access url_for from rake task
How do I access ActionController:Base url_for method from a Rake task. I tried to access ActionController from irb but it doesn''t work? Check out the pasite http://pastie.caboo.se/131266 -- Anil http://anilwadghule.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To
2006 Nov 28
1
link_to and url_for in ActionMailer
I am new to ActionMailer and having a problem. I want to be able to send a notification e-mail when a new item is added to a list. Sending an e-mail to the right people on creation is working fine. However, I want to include in the e-mail a link to the application so that users can click on the link in the e-mail and immediately be taken to the show view for the new item. When I add a link_to
2013 Nov 13
2
Cannot receive from specified address Unauthenticated senders not allowed
On trying to run a rake task via crontab, I''m getting the following error: rake aborted! 550 Cannot receive from specified address <help-+zpghU0kKgY@public.gmane.org>: Unauthenticated senders not allowed /mnt/voylla-production/shared/bundle/ruby/1.9.1/gems/mail-2.3.3/lib/mail/network/delivery_methods/smtp.rb:129:in `block in deliver!''
2007 Feb 16
4
Auto detect URL for ActionMailer?
Hi, how can I call the url in an actionMailer definition - so that it automatically detects what the rails application server is and puts it in the url that is mailed to the client? (I don''t want to have to change it every time the hostname is changed - I''d like the application to auto detect what the host is - whether it''s localhost:3000 or my own website... example:
2008 Mar 06
3
facebook_url_rewriter not used in Publisher?
As per my last email, I''m generating links to our app outside of Facebook. Sorry for the onslaught of emails on this. I do link generation in Publisher based code as well. What I''m finding is that the Facebooker UrlRewriter doesn''t get used in Publisher. This makes sense if we assume that Publisher can be used outside of an HTTP request, and things like the
2010 Jul 08
1
[Rails3] Issue in modifying locale and redisplaying page
In a test app, I have a drop-down selection to change the language of the site. I use an Ajax request to an action in which the locale is changed, and the it''s redirected to the home page unfortunately, the locale seems to be changed but the home page doesn''t reflect the new language .. application_controller.rb .. before_filter :set_locale def set_locale I18n.locale =
2008 Jun 12
3
Upgrading to 2.1 breaks my named routes
I just upgraded to 2.1 and attempted to log in to my application and when this line is reached in my login action: redirect_to(index_url) I get the error "wrong number of arguments (0 for 1)" [stack trace below]. Here''s my route: map.index ''index'', :controller => ''e_simply'', :action => ''index'' I found
2012 Dec 12
1
Devise route for confirmation error with :locale
Rails 3.1.3 I have setup devise and i18n . In routes.rb scope "/:locale" do devise_for :users, :controllers => { :registrations => ''registrations'' } ... end But in the process of confirmation, No route matches {:action=>"create", :controller=>"devise/confirmations",
2007 Apr 22
7
Getting a complete URL from Rails
Hello, I''m sending out an e-mail message to new users of my service. I want to send a particular link in this e-mail but I can''t figure out how to get a complete URL from the url_for method. Is there a way to do this without manually setting the host name? Thank you, -- Miles --~--~---------~--~----~------------~-------~--~----~ You received this message because you are
2009 Nov 30
0
Problem with ActionMailer in controller specs - works in model specs
I am having a problem with my controller tests that include ActionMailer. The tests work for the model test, e.g. I have a UserNotifier model that sends account activation e-mails and the spec''s work fine. When I run the UsersController spec''s that test some of the same functionality (e.g. uses the UserNotifier model), I get: ArgumentError in ... wrong number of arguments (0
2006 Jan 16
1
default_url_options for relative tag URLs
Hello, I need help with using ''default_url_options''. At least this is the function that I *think* is involved in the solution I seek. :) I''m deploying my rails app beneath an Apache ProxyPass setup. I''ve got it all working fine except that any rails tagging functions in my templates create absolute URL references. For example, this stylesheet function in my
2007 Dec 12
0
default_url_options
Hi, i recently added a def default_url_options to application.rb (used by url_for , *_path etc). My method references request (eg request.domain) . But when I spec a controller, its dies in default_url_options with nil.domain, Is there a way for it to see "request"? I prefer to not have to stub it on every example. linoj
2008 Jan 25
2
Routing optimization, named routes and default url options
I came across this when switching from rails 1.2.6 to 2.0.2, there is a change in the way routes are generated between these to version due to the routing optimization in rails 2.0.2. In version 1.2.6 it was possible to overwrite the default_url_options method in ActionController::Base to define parameters attached to each generated url. Due to the routing optimization in rails 2.0.2 this is not
2009 Jan 09
6
Accessing request.host in UserMailer
I am using subdomains in my application to control context. Therefor, during user registration, password reset, and other actions that require an email to be sent with a link to be clicked, I need to ensure that the subdomain appropriate for the user is used. It seems I need to be able to access request.host from within an ActionMailer model. But I am not clear how to do this. Any help would be
2008 Mar 31
10
Problems with *_path() and *_url() helpers when using Publisher
Hello, I am running into issues using *_path() and *_url() helpers the Facebooker Publisher framework. I encounter the following error when using these helpers while *inside of a partial*: undefined method `default_url_options'' for ActionView::Base:Class I''ve seen a few other people speak about this issue, yet I haven''t seen any resolution on the mailing list yet.