Class: Spree::Reimbursement::Credit
- Defined in:
- app/models/spree/reimbursement/credit.rb
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
belongs_to_required_by_default, for_store, has_many_inversing, json_api_columns, json_api_permitted_attributes, json_api_type, page, spree_base_scopes, spree_base_uniqueness_scope
Methods included from Preferences::Preferable
#clear_preferences, #default_preferences, #defined_preferences, #deprecated_preferences, #get_preference, #has_preference!, #has_preference?, #preference_default, #preference_deprecated, #preference_type, #set_preference
Class Method Details
.total_amount_reimbursed_for(reimbursement) ⇒ Object
12 13 14 |
# File 'app/models/spree/reimbursement/credit.rb', line 12 def total_amount_reimbursed_for(reimbursement) reimbursement.credits.to_a.sum(&:amount) end |
Instance Method Details
#description ⇒ Object
17 18 19 |
# File 'app/models/spree/reimbursement/credit.rb', line 17 def description creditable.class.name.demodulize end |