RubyFlow The Ruby and Rails community linklog

ScopedSearch

I just launched ScopedSearch gem for Rails 3. With it you can easily implement search forms and do column ordering based on your models scopes. Compatible with ActiveRecord and Mongoid! See the example in the README…

Comments

The name might be confusing, because there already is a scoped_search gem (written by me): http://github.com/wvanbergen/scoped_search

Yeah, you are right.

Please give me some time to find a new great name…

No problem, take the time to think of something great.

The use cases of both gems are different. I guess “scoped search” describes your gem somewhat better, but mine is already around for 2 years, so I am not really able to change the name anymore.

Are you using ActiveModel, so that this plugin could be easily used with both ActiveModel and DataMapper?

hi postmodern,

this works with both AR and Mongoid because AR and Mongoid supports chainable scopes and also because both support accessing the scopes that belongs to a model via the class method “scopes” (see the source, it’s very simple and short).

If DataMapper supports the same kind of features, it would be possible to adapt.

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in