Re: Controller Search Strategy

Luke Pearce
Sat, 13 Feb 2010 22:45:30 -0000

sshefer wrote:
> I''m trying to create a search action for one of my controllers
that
> can take in different params.  Something I can use like an api call:
>
> ../users/search?first_name=john&org_id=1
>
> Any idea how I can start this?  I''d like to have a clean
"search"
> action but this is also copying the index action.  I''m thinking
that
> the action needs to serialize the params and apply them to a find but
> I''m not sure if this is the best way.
>
> Thanks.

Have you looked at searchlogic?

http://github.com/binarylogic/searchlogic

Sounds exactly what you are looking for.

Cheers
Luke
--
Posted via http://www.ruby-forum.com/.