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



8
9
10
11
# File 'app/models/spree/store_credit_category.rb', line 8

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)


13
14
15
# File 'app/models/spree/store_credit_category.rb', line 13

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