Module: NCore::FindSingle::ClassMethods

Defined in:
lib/ncore/methods/find_single.rb

Instance Method Summary collapse

Instance Method Details

#find(params = {}) ⇒ Object



6
7
8
9
# File 'lib/ncore/methods/find_single.rb', line 6

def find(params={})
  obj = new
  obj.reload(params)
end

#retrieve(params = {}) ⇒ Object



11
12
13
14
15
# File 'lib/ncore/methods/find_single.rb', line 11

def retrieve(params={})
  find params
rescue module_parent::RecordNotFound
  nil
end