Class: Spree::StoreCreditCategory

Inherits:
Base
  • Object
show all
Defined in:
core/app/models/spree/store_credit_category.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

display_includes, #initialize_preference_defaults, page, preference

Class Method Details

.reimbursement_category(_reimbursement) ⇒ Object



10
11
12
13
# File 'core/app/models/spree/store_credit_category.rb', line 10

def self.reimbursement_category(_reimbursement)
  Spree::StoreCreditCategory.find_by(name: reimbursement_category_name) ||
    Spree::StoreCreditCategory.first
end

Instance Method Details

#non_expiring?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'core/app/models/spree/store_credit_category.rb', line 15

def non_expiring?
  self.class.non_expiring_credit_types.include? name
end