There is! [Scopes](http://guides.rubyonrails.org/active_record_querying.html#scopes)