Sha256: f33fe5451dff20afdf433a950c4c3a9099c3c2ad3a9ffd035c55a57c33806080

Contents?: true

Size: 1.27 KB

Versions: 38

Compression:

Stored size: 1.27 KB

Contents

module Spree
  module Core
    module ControllerHelpers
      module StrongParameters
        def permitted_attributes
          Spree::PermittedAttributes
        end

        delegate *Spree::PermittedAttributes::ATTRIBUTES,
                 :to => :permitted_attributes,
                 :prefix => :permitted

        def permitted_payment_attributes
          permitted_attributes.payment_attributes + [
            :source_attributes => permitted_source_attributes
          ]
        end

        def permitted_checkout_attributes
          permitted_attributes.checkout_attributes + [
            :bill_address_attributes => permitted_address_attributes,
            :ship_address_attributes => permitted_address_attributes,
            :payments_attributes => permitted_payment_attributes,
            :shipments_attributes => permitted_shipment_attributes
          ]
        end

        def permitted_order_attributes
          permitted_checkout_attributes + [
            :line_items_attributes => permitted_line_item_attributes
          ]
        end

        def permitted_product_attributes
          permitted_attributes.product_attributes + [
            :product_properties_attributes => permitted_product_properties_attributes
          ]
        end
      end
    end
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
spree_core-2.3.13 lib/spree/core/controller_helpers/strong_parameters.rb
spree_core-2.2.14 lib/spree/core/controller_helpers/strong_parameters.rb
spree_core-2.3.12 lib/spree/core/controller_helpers/strong_parameters.rb
spree_core-2.2.13 lib/spree/core/controller_helpers/strong_parameters.rb
spree_core-2.3.11 lib/spree/core/controller_helpers/strong_parameters.rb
spree_core-2.2.12 lib/spree/core/controller_helpers/strong_parameters.rb
spree_core-2.3.10 lib/spree/core/controller_helpers/strong_parameters.rb
spree_core-2.3.9 lib/spree/core/controller_helpers/strong_parameters.rb
spree_core-2.2.11 lib/spree/core/controller_helpers/strong_parameters.rb
spree_core-2.2.10 lib/spree/core/controller_helpers/strong_parameters.rb
spree_core-2.3.8 lib/spree/core/controller_helpers/strong_parameters.rb
spree_core-2.3.7 lib/spree/core/controller_helpers/strong_parameters.rb
spree_core-2.2.9 lib/spree/core/controller_helpers/strong_parameters.rb
spree_core-2.1.12 lib/spree/core/controller_helpers/strong_parameters.rb
spree_core-2.3.6 lib/spree/core/controller_helpers/strong_parameters.rb
spree_core-2.2.8 lib/spree/core/controller_helpers/strong_parameters.rb
spree_core-2.1.11 lib/spree/core/controller_helpers/strong_parameters.rb
spree_core-2.3.5 lib/spree/core/controller_helpers/strong_parameters.rb
spree_core-2.2.7 lib/spree/core/controller_helpers/strong_parameters.rb
spree_core-2.1.10 lib/spree/core/controller_helpers/strong_parameters.rb