Module: Concerns::Findable
- Included in:
- ShopifyApp
- Defined in:
- lib/concerns/findable.rb
Instance Method Summary collapse
Instance Method Details
#find_by_name(name) ⇒ Object
2 3 4 |
# File 'lib/concerns/findable.rb', line 2 def find_by_name(name) self.all.find {|object| object.name == name || object.name.downcase.include?(name)} end |
#find_by_url(url) ⇒ Object
6 7 8 |
# File 'lib/concerns/findable.rb', line 6 def find_by_url(url) self.all.find {|object| object.url == url} end |