Method: Pipekit::Repository#find_by
- Defined in:
- lib/pipekit/repository.rb
#find_by(options) ⇒ Object
Public: Get the first record by one field from Pipedrive.
options - A Hash with one key-value pair. Key is a field name and values is a field value.
Examples
find_by(name: "John Doe")
find_by(github_username: "pipedriver")
find_by(id: 123)
Returns a Hash or nil if none found.
41 42 43 |
# File 'lib/pipekit/repository.rb', line 41 def find_by() where(, true).first end |