Hi, I''ve got my rails app in a subdirectory called ''huisrekening/''. But when I do this: redirect_to ''/''. It redirects to ''/'' and not to ''/ huisrekening'' like I would like. Is it possible without doing redirect_to ''huisrekening/'' ? Maybe something in environment.rb or something? I thought about using a base href. But that''s a bit nasty too. Thanks in advance! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
LeonB wrote:> I''ve got my rails app in a subdirectory called ''huisrekening/''. But > when I do this: redirect_to ''/''. It redirects to ''/'' and not to ''/ > huisrekening'' like I would like. Is it possible without doing > redirect_to ''huisrekening/'' ?Rails won''t do anything to URLs given as strings for obvious reasons. I guess it should work if you do redirect_to(:controller => ''home'', :action => ''index'') ... assuming home/index is your front/home action. -- Jakob Skjerning - http://mentalized.net --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Thanks. This worked for me: :controller => ''dashboard'', :action => ''index'' To bad about the slash, but it''s good enough. Thanks! On Mar 20, 12:54 pm, Jakob Skjerning <j...-pixy5vpirPnEueBKFXcDjA@public.gmane.org> wrote:> LeonBwrote: > > I''ve got my rails app in a subdirectory called ''huisrekening/''. But > > when I do this: redirect_to ''/''. It redirects to ''/'' and not to ''/ > > huisrekening'' like I would like. Is it possible without doing > > redirect_to ''huisrekening/'' ? > > Rails won''t do anything to URLs given as strings for obvious reasons. I > guess it should work if you do > > redirect_to(:controller => ''home'', :action => ''index'') > > ... assuming home/index is your front/home action. > > -- > Jakob Skjerning -http://mentalized.net--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---