plugins

Easily Search on ActiveRecord Attributes

Rails’s named_scopes are great, and the ability to chain named_scopes together are even better. I am sure many of us have done something like this before:

User.active.live_in('Virginia')

That would give you the active users who live in the state of Virginia. You would define something like these in your User model:

Syndicate content