squareteam/yodatra — pull request #3 by popox (2014-08-09 10:55:51+00:00)
Title: feat(search): Add a search action for models

## Search action for Models controller

This adds a optionnal `search` on models controllers.

For instance, if you enable the search on a `UsersController` like that:

```ruby
class UsersController < Yodatra::ModelsController
[...]
enable_search_on :email, :name
[...]
```

You will have a new action available on this route:

GET /users/search?q=terms

Which will search for users from the `:name` __or__ `:email` attribute trying to match for each words of the search query.