WeBrick handles the link correctly on development, but apache in production does not: <%= link_to "Orders", :controller => ''/admin/orders'', :action => ''index'' %> The controller lives in ./app/controllers/admin/orders_controller.rb From the production log, apache is looking for the "orders" action in "./app/controllers/admin_controller.rb" and not finding it. -- log message on production -- Processing AdminController#orders (for 209.11.127.13 at 2008-06-05 14:19:19) [GET] Session ID: 24e7a44689df1c85a911492e0d581985 Parameters: {"action"=>"orders", "controller"=>"admin"} ------------------------------------------- I expected it to look for the "index" action in the "orders" controller. -- Anthony Ettinger 408-656-2473 http://anthony.ettinger.name --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Anthony Ettinger wrote:> WeBrick handles the link correctly on development, but apache in > production does not: > > <%= link_to "Orders", :controller => ''/admin/orders'', :action => ''index'' %> > > The controller lives in ./app/controllers/admin/orders_controller.rbI suspect you either can''t or don''t want to put sub-folders among the controllers. Just write an app/controllers/orders_controller.rb if you need the URI /admin/orders/index, then write a named route into your routes.rb file. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
have you tried " :controller => ''admin/orders'' "? While it is possible to nest your controllers, I have found that this leads to more trouble than it is worth. Have you considered having your orders controller at the top level, and simply having some form of security? Also, if the above does not work--are you using default routes, or something else? If something else can we have a peek? On Jun 5, 10:02 pm, Phlip <phlip2...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Anthony Ettinger wrote: > > WeBrick handles the link correctly on development, but apache in > > production does not: > > > <%= link_to "Orders", :controller => ''/admin/orders'', :action => ''index'' %> > > > The controller lives in ./app/controllers/admin/orders_controller.rb > > I suspect you either can''t or don''t want to put sub-folders among the controllers. > > Just write an app/controllers/orders_controller.rb > > if you need the URI /admin/orders/index, then write a named route into your > routes.rb file.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
<%= link_to "Orders", :controller => ''admin/orders'', :action => ''index'' %> Try this -- 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 -~----------~----~----~----~------~----~------~--~---