Class: Shark::Membership

Inherits:
Base
  • Object
show all
Extended by:
ContactService::Resource
Defined in:
lib/shark/membership.rb

Class Method Summary collapse

Methods inherited from Base

add_datetime_accessors

Class Method Details

.exists?(group_id:, contact_id:) ⇒ Boolean

Returns:

  • (Boolean)


9
10
11
12
13
14
# File 'lib/shark/membership.rb', line 9

def self.exists?(group_id:, contact_id:)
  where(group_id: group_id, contact_id: contact_id).first
  true
rescue Shark::ResourceNotFound
  false
end