MetaSearch and MetaWhere 0.5.0 released!
CommentsWith the release of Rails 3.0.0.beta4 and Arel 0.4.0, all of the pieces have come together in gem form to allow a new gem release of both MetaSearch and MetaWhere.
I’m really excited about these releases, as they’ve been a long time coming. The last MetaSearch gem release was way back in March, while the last MetaWhere gem was released in April – this felt like an eternity in the fast-moving edge Rails world. :) I hope you enjoy the new release, and thanks in advance for submitting any bugs you find!
Now, on to what’s new since the last gem releases…
MetaSearch 0.5.0
Changes since 0.3.0 (released March 16th, 2010):
- Refactoring to make use of Arel predicates in query creation
- Addition of validators – customizable code blocks to determine whether a supplied value is sufficient to use as a search term
- Improvements to check_boxes and collection_check_boxes to make them easier to style
- Attribute and association exclusion syntax has been updated, and a whitelist version has been added as well (attr_searchable/attr_unsearchable and assoc_searchable/assoc_unsearchable)
- Support for custom search methods – any class method which returns a relation can be used. This, of course, includes scopes
- sort_link helper added. Supply a MetaSearch::Builder instance and the name of the attribute to sort on to generate sort links (similar to Searchlogic in Rails 2.3). This works across associations as well.
- Multi-level association support. Can go up to 5 levels deep, including the search base.
- Searches can be built against a relation with pre-existing where conditions to search across a narrowed scope
MetaWhere 0.5.0
Changes since 0.3.3 (released April 30th, 2010):
- Smarter order clauses: Company.joins(:developers).order(:developers => :salary.desc)
- Operator overloads on symbols are now opt-in, via MetaWhere.operator_overload!
- Multiple self-referencing joins are supported
- Relations scope new records properly when equality conditions exist (same as stock AR but supporting all equality predicate syntax)
- Support for merging relations with a different base