Module: Crm::Core::Mixins::Findable::ClassMethods
- Included in:
- Account, Activity, Crm::Collection, Crm::Contact, Crm::Core::Mixins::Findable, Event, EventContact, Mailing, Type
- Defined in:
- lib/crm/core/mixins/findable.rb
Instance Method Summary collapse
-
#find(id) ⇒ BasicResource
Returns the requested item.
Instance Method Details
#find(id) ⇒ BasicResource
Returns the requested item.
18 19 20 21 22 23 24 |
# File 'lib/crm/core/mixins/findable.rb', line 18 def find(id) if id.blank? raise Crm::Errors::ResourceNotFound.new( "Items could not be found.", [id]) end new({'id' => id}).reload end |