Class: SpreeCmCommissioner::Claim

Inherits:
Base
  • Object
show all
Defined in:
app/models/spree_cm_commissioner/claim.rb

Class Method Summary collapse

Class Method Details

.free_claimed?(user_id:, product_id:, claimable_id:, claimable_type:) ⇒ Boolean

Returns:

  • (Boolean)


18
19
20
21
22
23
24
25
# File 'app/models/spree_cm_commissioner/claim.rb', line 18

def self.free_claimed?(user_id:, product_id:, claimable_id:, claimable_type:)
  free_claims.exists?(
    user_id: user_id,
    product_id: product_id,
    claimable_id: claimable_id,
    claimable_type: claimable_type
  )
end