Erwin
2012-Feb-02 09:45 UTC
action_mailer.default_url_options not used in named routes within mailer view ?
In my mailer view I have a named route :
accept_user_invitation_url(@resource, :invitation_token =>
@resource.invitation_token)
In my routes :
accept_user_invitation GET /users/invitation/accept(.:format)
{:action=>"edit", :controller=>"users/invitations"}
in development , I set
config.action_mailer.default_url_options = { :host =>
''lvh.me'' , :port
=> 3000}
===
I am generating a mail from a subdomain form,
http://foo.lvh.me:3000/users/invitation/new ( submit to POST
http://foo.lvh.me:3000/users/invitation/create)
in the mailer view the accept_user_invitation_url is NOT using the
config.action_mailer.default_url_options
but rather generating the url with the current subdomain host
http://foo.lvh.me:3000
however with a ddebugger in mailer, before rendering , the default is
still correct....
Rails.configuration.action_mailer.default_url_options =>
{:host=>"lvh.me", :port=>3000}
why the named route is not using it ?
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.