gregspurrier/has_enumeration — pull request #5 by evandowling (2012-04-09 05:10:12+00:00)
Title: Arel 3.x.x support for has_enumeration

I've gone through and added some support to has_enumeration for arel 3.x.x. The chief difference here is that arel 3 has moved back to letting active record control the conditions clauses, and, more specifically, to handle the set of column mappings. Interestingly enough, I was able to simply move back to the ActiveRecord 2.x technique and all of the tests continued passing. I wasn't able to get the meta_where stuff working as it has been deprecated for ActiveRecord 3.1 +. I'm not sure about the right way to handle that. I was experimenting with squee, which in theory supports ActiveRecord 3.0, but I found this to not be the case. I think it might be worthwhile so support this sort of version dependency stuff directly in the gemspec dependencies section, but I was unclear as to how I could set this up in the Gemfile in such a way that jeweler would understand and would keep the backwards compatibility features up to date. In any case, I was forced to comment out the meta_where dependent test case, but there's no reason that the ActiveRecord 3.0.x functionality would be impacted by this change.