Class: Spree::StoreCreditCategory

Inherits:
Base
  • Object
show all
Defined in:
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

Methods included from Preferences::Preferable

#admin_form_preference_names, #default_preferences, #defined_preferences, #get_preference, #has_preference!, #has_preference?, #preference_default, #preference_type, #set_preference

Class Method Details

.reimbursement_category(_reimbursement) ⇒ Object



10
11
12
13
# File '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 'app/models/spree/store_credit_category.rb', line 15

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