Hello, I am planning to create a much larger application using Ruby on Rails. I am stopped after thinking how to organize my controllers. Sure enough I could make admin/blog as a controller name, but what bothers me is that I have some link_to calls in my layouts template and it does not get into the right controller when it is clicked. To give you an insight: Layout: <?= link_to ''blog'', :controller => ''admin/blog'' ?> admin/blog/index.rhtml <?= link_to ''Back to Main'', :controller => ''home'' ?> When I am in the admin/blog controller and I click that latter anchor, it would go to: /admin/home which should be in: /home Why I am doing it that way, is I would have several "modules" like admin. Any idea how to go around with this? Thanks, Junrey Beduya -- 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 -~----------~----~----~----~------~----~------~--~---
Try putting a / in front of controllers, e.g. <?= link_to ''Back to Main'', :controller => ''/home'' ?> -- 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 -~----------~----~----~----~------~----~------~--~---
That''s exactly what I need. Why I haven''t thought of that? hmmm... Thank you so much... Joe Ruby MUDCRAP-CE wrote:> Try putting a / in front of controllers, e.g. > > <?= link_to ''Back to Main'', :controller => ''/home'' ?>-- 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 -~----------~----~----~----~------~----~------~--~---