Module: Sandwich::Ext::FindOrMake::ActiveRecord

Defined in:
lib/sandwich/ext/machinist.rb

Instance Method Summary collapse

Instance Method Details

#find_or_make(filters, args = {}) ⇒ Object



5
6
7
# File 'lib/sandwich/ext/machinist.rb', line 5

def find_or_make(filters, args = {})
  find(:first, :conditions => filters) || make(filters.merge(args))
end