metautonomo.us

Confounding URL typists since 2007.

Monthly Archives: April 2010

MetaUpdates

0 Comments

MetaSearch and MetaWhere updates, I mean. I spent some time over the weekend (and technically tonight, as well) wrapping up some nifty new features on MetaSearch and MetaWhere. Read on for the highlights.
Read the rest of this post

Filed under Blog
Apr 26, 2010

Introducing MetaWhere

8 Comments

Recently, I spent some time working on a patch to Rails core to allow ActiveRecord::PredicateBuilder to allow more powerful queries — that is, support for additional Arel predicates beyond Equality and In. If you’re not familiar with PredicateBuilder, that’s where the magic happens when converting the arguments you supply to ActiveRecord::Relation#where or ActiveRecord::Base#find‘s :conditions hash into Arel predicates for a query. Anyway, after a brief discussion with Pratik on #rails-contrib, where he shared a bit of insight into his thoughts on tackling the same problem and encouraged me to create a plugin, I came up with a bit of a hybrid — something that I think scratches this particular itch pretty well for me: MetaWhere. Read on for how it works. [Update: If you're arriving via Ruby5 or the Rails weblog, you might also be interested in the latest MetaWhere updates, why I forked Arel, or the main MetaWhere page. Thanks for visiting!]
Read the rest of this post

Filed under Blog
Apr 15, 2010

Ruby 1.9, BasicObject, and ! (not)

2 Comments

In a recent , Joe Smith raised an issue that bothered me while I was working on my fork of Arel: predicate negation (not) has odd left-to-right readability. While only a minor annoyance, it did get me to spend some time tonight investigating a possible solution. This was when I got acquainted with Ruby 1.9′s BasicObject class, and more specifically, BasicObject#!.
Read the rest of this post

Filed under Blog
Apr 10, 2010

MetaSearch: Testers wanted

3 Comments

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.
Read the rest of this post

Filed under Blog
Apr 3, 2010