Module: Spree::Core::ControllerHelpers::StrongParameters

Included in:
BaseController
Defined in:
lib/spree/core/controller_helpers/strong_parameters.rb

Instance Method Summary collapse

Instance Method Details

#permitted_attributesObject



5
6
7
# File 'lib/spree/core/controller_helpers/strong_parameters.rb', line 5

def permitted_attributes
  Spree::PermittedAttributes
end

#permitted_checkout_attributesObject



19
20
21
22
23
24
25
26
# File 'lib/spree/core/controller_helpers/strong_parameters.rb', line 19

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

#permitted_order_attributesObject



28
29
30
31
32
# File 'lib/spree/core/controller_helpers/strong_parameters.rb', line 28

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

#permitted_payment_attributesObject



13
14
15
16
17
# File 'lib/spree/core/controller_helpers/strong_parameters.rb', line 13

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

#permitted_product_attributesObject



34
35
36
37
38
# File 'lib/spree/core/controller_helpers/strong_parameters.rb', line 34

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