Method: NestedRecord::Collection#find_by

Defined in:
lib/nested_record/collection.rb

#find_by(attrs) ⇒ Object



84
85
86
87
# File 'lib/nested_record/collection.rb', line 84

def find_by(attrs)
  attrs = attrs.stringify_keys
  find { |obj| obj.match?(attrs) }
end