Module: NaranyaEcm::Rest::FinderMethods
- Defined in:
- lib/naranya_ecm/rest/finder_methods.rb
Instance Method Summary collapse
Instance Method Details
#find(*args) ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/naranya_ecm/rest/finder_methods.rb', line 7 def find(*args) case args.length when 0 raise ResourceNotFound, "Couldn't find #{self.name} without an ID" when 1 find_one(args.first) else self.where(id: args) end end |