Method: DataBroker::Mapper::InstanceMethods#find
- Defined in:
- lib/data_broker/mapper.rb
#find(id, eager_load: true) ⇒ Object
75 76 77 78 79 80 81 82 |
# File 'lib/data_broker/mapper.rb', line 75 def find(id, eager_load: true) record = self.eager_record(eager_load).find_by(:id => id) if record.nil? nil else records_to_objects(record, :eager_load => eager_load).first end end |