On Thursday, 17 February 2011 at 4:32 PM, Gabe Hollombe wrote:
Hey all,
> 
> I've got a Rails 3 app. Let's say I'm deploying it to http://foo.com/bar. In 
> a mailer, I want to use sign_in_url (sign_in is a named route) to get a url 
> like http://foo.com/bar/sign_in. Alas, in the context of my mailer, Rails has 
> no idea about the fact that this app is deployed to a subdirectory. So, 
> what's the right way to get the proper url with the deployed subdirectory, 
> from the named route url helper? I thought setting 
> ENV['RAILS_RELATIVE_URL_ROOT'] = '/bar' would work, but it doesn't seem to 
> get looked at when my mailer is generating the url with the named route 
> helper.

Just a guess, but maybe ENV['RAILS_RELATIVE_URL_ROOT'] was replaced with 
Rails.relative_url_root, like ENV['RAILS_ENV'] → Rails.env and friends.

I haven't run a rails app on a path so I'm not much help apart from that, sorry 
:)

—Ben

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
or Rails Oceania" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rails-oceania?hl=en.

Reply via email to