Class: Spree::ReturnReason

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

Class Method Summary collapse

Methods inherited from Base

display_includes

Methods included from Core::Permalinks

#generate_permalink, #save_permalink

Class Method Details

.reasons_for_return_items(return_items) ⇒ Object



14
15
16
17
# File 'app/models/spree/return_reason.rb', line 14

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