On Tue, May 7, 2013 at 3:38 AM, Paul Bergstrom
<lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:
> How do I define the route for a search form that goes to index
> action, which either lists all, if no search, or the search result?
The route can be just the same as always. The way I''ve done this sort
of thing is that in the controller, it checks for search params. If
it finds any, it does the search and passes along the result set, else
it passes along all. (Subject to pagination if wanted.)
-Dave
--
Dave Aronson, the T. Rex of Codosaurus LLC,
secret-cleared freelance software developer
available for contracts or temp employment.
See information at http://www.Codosaur.us/.
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.