I''m a little confused about custom routes in rails 3. I have a variable that I had a default value for in rails 2, and changing it to rails 3 version gives this: match ''stories/list/:story_list/:search'' => ''stories#index'', :as => ''story_list'', :story_list => ''popular'', :search => nil When I use the route, I just call story_list_path(:story_list => ''search'', :search => ''something'') this worked in rails 2, but I''m getting this error in rails 3: No route matches {:story_list=>"search", :controller=>"stories"} I can''t find out how to fix this as tutorials on the web just go over basic changes and what not. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I''m wondering about something along these lines too....... -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
daze wrote in post #969695:> I''m wondering about something along these lines too.......Well, you didn''t quote the lines you were replying to, and you didn''t state what you were wondering...so I''m left wondering how to read your mind. :D In future, please just ask what you need to ask. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Dec 20, 9:13 pm, Marnen Laibow-Koser <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Well, you didn''t quote the lines you were replying to, and you didn''t > state what you were wondering...so I''m left wondering how to read your > mind. :D > > In future, please just ask what you need to ask. > > Best, > -- > Marnen Laibow-Koserhttp://www.marnen.org > mar...-sbuyVjPbboAdnm+yROfE0A@public.gmane.orgFine... http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/4fcc3b20b24822e5 wondering about how to use match with a route in an admin namespace.... -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@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.
On Sun, Dec 19, 2010 at 5:03 PM, Mike C <snibble-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m a little confused about custom routes in rails 3. I have a > variable that I had a default value for in rails 2, and changing it to > rails 3 version gives this: > > match ''stories/list/:story_list/:search'' => ''stories#index'', :as => > ''story_list'', :story_list => ''popular'', :search => nil > > When I use the route, I just call story_list_path(:story_list => > ''search'', :search => ''something'') > > this worked in rails 2, but I''m getting this error in rails 3: > > No route matches {:story_list=>"search", :controller=>"stories"} > > I can''t find out how to fix this as tutorials on the web just go over > basic changes and what not. >what is your output of : % rake routes | grep stories -- make haste slowly \ festina lente \ - mobile +1_415_632_6001 curtis-DDU1nqEjlGkHaT8GDLgCUg@public.gmane.org http://robotarmyma.de -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@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.
After a few days of experimenting I think I got it fixed. All I did was make the search variable optional, and removing it also does the trick. On Dec 20, 10:58 pm, daze <dmonopol...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Dec 20, 9:13 pm, Marnen Laibow-Koser <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: > > > Well, you didn''t quote the lines you were replying to, and you didn''t > > state what you were wondering...so I''m left wondering how to read your > > mind. :D > > > In future, please just ask what you need to ask. > > > Best, > > -- > > Marnen Laibow-Koserhttp://www.marnen.org > > mar...-sbuyVjPbboAdnm+yROfE0A@public.gmane.org > > Fine...http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/... > > wondering about how to use match with a route in an admin namespace....-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@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.