Class: Shark::Contact
- Extended by:
- Shark::ContactService::Resource
- Includes:
- NormalizedEmail
- Defined in:
- lib/shark/contact.rb
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
Class Method Details
.find_by_email(email) ⇒ Object
16 17 18 19 20 |
# File 'lib/shark/contact.rb', line 16 def self.find_by_email(email) normalized_email = normalize_email(email) = { filter: { equals: { email: normalized_email } } } where().first end |
.find_by_permissions(permissions_filter) ⇒ Object
30 31 32 |
# File 'lib/shark/contact.rb', line 30 def self.() includes('permission').where(permissions: ) end |