Method: TopModel::Base.find_all_by_attribute

Defined in:
lib/topmodel/base.rb

.find_all_by_attribute(name, value) ⇒ Object

:nodoc:



40
41
42
43
# File 'lib/topmodel/base.rb', line 40

def find_all_by_attribute(name, value) #:nodoc:
  items = records.values.select {|r| r.send(name) == value }
  collection.new(items.deep_dup)
end