module Concerns::Findable
Public Instance Methods
find_by_name(name)
click to toggle source
# 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)
click to toggle source
# File lib/concerns/findable.rb, line 6 def find_by_url(url) self.all.find {|object| object.url == url} end