Ernie Miller

No, I don't work in NYC, DC, or the valley, and I'm cool with that.

RSS Feed

MetaSearch: Testers wanted

Posted by Ernie on April 3, 2010 at 5:42 pm

MetaSearch has had a bunch of nifty additions since the last released gem version. I’d really love to have some testers try out the new version, but it requires some handy additions to Arel which currently only exist on my fork. Those intrepid enough to try it out will gain a host of bug fixes, custom validators, and any- and all-suffixed methods for easier multi-condition searches.

Anyway, to try out the latest and greatest MetaSearch, just add the following to your Gemfile:

gem 'arel', :git => "git://github.com/ernie/arel.git"
gem 'meta_search', :git => "git://github.com/ernie/meta_search.git"

Be sure to check out the docs for info on how to use all the new goodies, and please send me your feedback!

Filed under Blog
Tagged as , , , ,
You can leave a comment, or trackback from your own site.
  • Darren Case

    Thank you for taking this on, Ernie. It appears that the MetaSearch::Builder object returned from the search method cannot be chained with named scopes or additional Arel methods. I am trying to figure out the best way to integrate MetaSearch with Geokit’s finders, and it seems like two options would be using named scopes, or adding custom Wheres. With custom Wheres, chaining would obviously no longer be necessary. What do you think?

  • http://thebalance.metautonomo.us Ernie

    Hi Darren, thanks for testing! To answer your question: Builder delegates several methods to the underlying Relation. These are defined in meta_search.rb as follows:

    RELATION_METHODS = [:joins, :includes, :all, :count,
      :to_sql, :paginate, :find_each, :first, :last, :each]

    If there are specific (universally-applicable) methods you’d really like to see delegated (where for instance?), I’d be happy to add them. Alternately, keep in mind that you can pull out the underlying relation object at any point you like by calling @builder.relation and chaining from there.

  • Darren Case

    Right on, that makes sense. Thank you.

  • Pingback: metautonomo.us » Blog Archive » MetaUpdates

  • Pingback: metautonomo.us » Blog Archive » Why (fork) Arel?

About

I'm Ernie Miller. But then, you probably knew that by looking at the page title, or the URL. I'm a Ruby programmer in Louisville, Kentucky. This blog used to be called "metautonomo.us", which I thought was kind of clever, but nobody, including me, could type it. Lesson learned.