Steven Brooks' Blog

Student @Flatiron School


Yesterday I worked on another search gem this time being Ransack. In Outlinked we used Sunspot (who I’m not even going to give a link to) which I will never use again. I was very pleased with how Ransack went and how easy it was to use as well as have dynamic searching.

Ransack was very strait forward. This is what my html.erb file looked like. This allowed a user to continue to drill down their search (dynamic):

My params

Then you go into the controller and set your instance variable to the results of the search:

My params

And bam, you get a nice dynamic search (I’m wondering if these drop downs can be autompletes, that would probable make the UX a little better):

My params