Class: Spree::ReturnReason

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

Class Method Summary collapse

Methods inherited from Base

display_includes, #initialize_preference_defaults, page, preference

Class Method Details

.reasons_for_return_items(return_items) ⇒ Object



9
10
11
12
# File 'core/app/models/spree/return_reason.rb', line 9

def self.reasons_for_return_items(return_items)
  # Only allow an inactive reason if it's already associated to a return item
  active | return_items.map(&:return_reason).compact
end