Sha256: d0d9290bb381d1aeb089439c57b017e2ce02f9d84cdd0ad2aa15c9d9b5045c42

Contents?: true

Size: 324 Bytes

Versions: 50

Compression:

Stored size: 324 Bytes

Contents

module Spree
  class ReturnReason < Spree::Base
    include Spree::NamedType

    has_many :return_authorizations

    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
  end
end

Version data entries

50 entries across 50 versions & 1 rubygems

Version Path
solidus_core-2.5.2 app/models/spree/return_reason.rb
solidus_core-2.5.1 app/models/spree/return_reason.rb
solidus_core-2.5.0 app/models/spree/return_reason.rb
solidus_core-2.5.0.rc1 app/models/spree/return_reason.rb
solidus_core-2.5.0.beta2 app/models/spree/return_reason.rb
solidus_core-2.5.0.beta1 app/models/spree/return_reason.rb
solidus_core-2.4.2 app/models/spree/return_reason.rb
solidus_core-2.3.1 app/models/spree/return_reason.rb
solidus_core-2.4.1 app/models/spree/return_reason.rb
solidus_core-2.2.2 app/models/spree/return_reason.rb
solidus_core-2.1.1 app/models/spree/return_reason.rb
solidus_core-2.0.3 app/models/spree/return_reason.rb
solidus_core-1.4.2 app/models/spree/return_reason.rb
solidus_core-1.3.2 app/models/spree/return_reason.rb
solidus_core-1.2.3 app/models/spree/return_reason.rb
solidus_core-2.4.0 app/models/spree/return_reason.rb
solidus_core-2.4.0.rc1 app/models/spree/return_reason.rb
solidus_core-2.4.0.beta1 app/models/spree/return_reason.rb
solidus_core-2.3.0 app/models/spree/return_reason.rb
solidus_core-2.3.0.rc3 app/models/spree/return_reason.rb