You can define an ActiveRelation named scope inside your model Address, for example, like so:
Archive for 'models'
There are lots methods in Rails where the last argument is a Hash. Sometimes the same Hash is passed into more than one method, causing you to repeat yourself. For example, when using validation helpers in your models, you may be doing something like this: Using with_options within a Model: Notice, :on => create is [...]