David Bird
2008-Aug-23 05:36 UTC
Route segment ":controller" cannot be optional because it precedes a required segment.
Hi, With this route... map.namespace :admin do |admin| admin.sort ''/:controller/sort/:sort_by/:sort_dir'', :action => ''sort'' end ...I get this message... Route segment ":controller" cannot be optional because it precedes a required segment. This segment will be required. The route works as expected, but the warning is worrying. Any ideas? Thanks, Dave --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Danimal
2008-Sep-12 01:40 UTC
Re: Route segment ":controller" cannot be optional because it precedes a required segment.
Dave, Did you ever get any resolution on this? I''m just now having exactly the same problem. I''m doing a filter though: map.namespace :admin do |admin| admin.filter '':controller/filter'', :action => ''filter'' end I wonder if there is some additional command-line hash option or parameter that can be passed in? This seems like something that would be fairly common... i.e. a common extra action across multiple controllers? -Danimal On Aug 22, 11:36 pm, David Bird <bird....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > With this route... > > map.namespace :admin do |admin| > admin.sort ''/:controller/sort/:sort_by/:sort_dir'', :action => ''sort'' > end > > ...I get this message... > > Route segment ":controller" cannot be optional because it precedes a > required segment. This segment will be required. > > The route works as expected, but the warning is worrying. Any ideas? > > Thanks, > > Dave--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---