3

It appears that Searchlogic doesn't work with Rails 3. (Among other things, Ryan Bates mentioned in in one of his RailsCasts, and the last question in the Google Group is from 2010.)

So I'm looking for a replacement. I like the functionality where you craft the field names of a search form and have that get turned into a Search object and then you could get the results with @search.all or @search.paginate.

At first, Meta Where and Meta Search looked promising. But then I found this notification that "MetaWhere will not be updated to support 3.1". (I'm using Rails 3.2.2.)

The developer is proposing a library called "Ransack" as the replacement for MetaWhere.

OK, maybe. But before I dive into "Ransack," I thought I'd put the question out there: does anyone know of another library available with similar functionality to SearchLogic as I described above? (View form populates a Search object.)

Ethan
  • 57,819
  • 63
  • 187
  • 237
  • 1
    https://github.com/ernie/squeel – Zabba Apr 06 '12 at 22:15
  • Is there a reason you don't want to use the default ActiveRecord query interface? Are you really getting that much of a benefit out of the dynamic finders offered by these gems? – davidcelis Apr 06 '12 at 22:15
  • @Zabba, thanks, but have an closer look at the specifics of my question. Squee does not have the functionality I described. – Ethan Apr 06 '12 at 22:28

1 Answers1

6

If you are using Rails 3.0 you should check out MetaSearch

If you are using Rails 3.1+ you should check out Ransack

Both are written by Ernie Miller.

bcardarella
  • 4,667
  • 4
  • 29
  • 45
  • Thanks for the answer. As I mentioned in my question, I'm using Rails 3.2.2 and I've heard of Ransack. I started checking out Ransack yesterday. So far it seems to work OK. But given the history behind Ransack, I'm still interested in finding out if anyone has experience with a alternative. – Ethan Apr 07 '12 at 15:44
  • MetaSearch seems to blow up in Rails 3.2.2: http://stackoverflow.com/questions/9858552/metasearch-gem-rails-3-0-working-scope-methods-fail-in-rails-3-2 – jpgeek Oct 10 '12 at 09:51
  • @jpgeek you want to use `ransack` for Rails 3.1+. https://github.com/ernie/ransack – bcardarella Oct 11 '12 at 14:37