Module: Ronin::Model::HasName::ClassMethods
- Defined in:
- lib/ronin/model/has_name.rb
Overview
Class methods that are added when Ronin::Model::HasName is included into a model.
Instance Method Summary collapse
-
#named(fragment) ⇒ Array<Model>
Finds models with names containing a given fragment of text.
Instance Method Details
#named(fragment) ⇒ Array<Model>
Finds models with names containing a given fragment of text.
65 66 67 |
# File 'lib/ronin/model/has_name.rb', line 65 def named(fragment) all(:name.like => "%#{fragment}%") end |