Paul Reitz wrote:
> I'm having a similar problem that none of these solutions will work for. 
> I understand you can redirect to a URL, the problem is - while I'm 
> developing my app I want to redirect to 'http://127.0.0.1:3000' but 
> after I deploy it I want it to redirect to something like 
> 'http://app.somedomain.com'. Is there a constant similar to 'RAILS_ROOT' 
> that I can use?

If there is no other way available then you can set your own constant in
   ./config/environments/development.rb
   ./config/environments/production.rb
   ./config/environments/test.rb

So, for development.rb and test.rb
   REDIRECT_HOST = 'http://127.0.0.1:3000'

while in production.rb
   REDIRECT_HOST = 'http://192.168.215.35:3333'

and in your controllers

   redirect_to REDIRECT_HOST

-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to