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

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

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Instance Method Details

#permitted_attributesObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



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

def permitted_attributes
  Spree::PermittedAttributes
end

#permitted_checkout_attributesObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



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

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_credit_card_update_attributesObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



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

def permitted_credit_card_update_attributes
  permitted_attributes.credit_card_update_attributes + [
    address_attributes: permitted_address_attributes
  ]
end

#permitted_order_attributesObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



40
41
42
43
44
# File 'lib/spree/core/controller_helpers/strong_parameters.rb', line 40

def permitted_order_attributes
  permitted_checkout_attributes + [
    line_items_attributes: permitted_line_item_attributes
  ]
end

#permitted_payment_attributesObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



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

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

#permitted_product_attributesObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



46
47
48
49
50
# File 'lib/spree/core/controller_helpers/strong_parameters.rb', line 46

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

#permitted_source_attributesObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



25
26
27
28
29
# File 'lib/spree/core/controller_helpers/strong_parameters.rb', line 25

def permitted_source_attributes
  permitted_attributes.source_attributes + [
    address_attributes: permitted_address_attributes
  ]
end

#permitted_user_attributesObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



52
53
54
55
56
57
# File 'lib/spree/core/controller_helpers/strong_parameters.rb', line 52

def permitted_user_attributes
  permitted_attributes.user_attributes + [
    bill_address_attributes: permitted_address_attributes,
    ship_address_attributes: permitted_address_attributes
  ]
end