consider using a scope - http://guides.rubyonrails.org/active_record_querying.html#scopes