27 Apr '12, 10am
ASCIIcasts - “Episode 176 - Searchlogic”:
. This works by creating a number of named scopes that can be called on any ActiveRecord model to search against that model’s attributes. Given, say, a User model with a username attribute, Searchlogic lets us use methods such as username_equals , username_does_not_equal , username_begins_with and so on. (For a longer list see the documentation on Searchlogic’s Github page .) Using named scopes has several advantages, not least of which is that we can chain them together to create more complex search conditions.