i''m not sure what to do when my production environment is not in the root path of the domain when it comes to including things like flash files. when testing, everything works great, but since i don''t have a helper like image_tag, i have to change the url of the flash file each time i test and then change it back when i deploy the changes. is there a helper in rails that will just add the root prefix to urls based on the environment? --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Dec 24, 9:06 pm, Josh <jjkie...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> is there a helper in rails that will just add the root prefix to urls > based on the environment?If there isn''t, I think you just wrote one. :) ///ark --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Josh Kieschnick wrote:> i''m not sure what to do when my production environment is not in the > root path of the domain when it comes to including things like flash > files. > > when testing, everything works great, but since i don''t have a helper > like image_tag, i have to change the url of the flash file each time i > test and then change it back when i deploy the changes. > > is there a helper in rails that will just add the root prefix to urls > based on the environment?you can play around w the different environment files ( environments/development.rb | production.rb | test.rb ) and play around with either self.document_root = "/some/path" or the RAILS_ROOT constant (also, a "some/path/" string) nothing here is tested, but i hope this leads to some new info or helps out digging a little further good luck! shai -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---