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



7
8
9
# File 'lib/spree/core/controller_helpers/strong_parameters.rb', line 7

def permitted_attributes
  Spree::PermittedAttributes
end

#permitted_checkout_address_attributesObject



33
34
35
# File 'lib/spree/core/controller_helpers/strong_parameters.rb', line 33

def permitted_checkout_address_attributes
  permitted_attributes.checkout_address_attributes
end

#permitted_checkout_confirm_attributesObject



45
46
47
# File 'lib/spree/core/controller_helpers/strong_parameters.rb', line 45

def permitted_checkout_confirm_attributes
  permitted_attributes.checkout_confirm_attributes
end

#permitted_checkout_delivery_attributesObject



37
38
39
# File 'lib/spree/core/controller_helpers/strong_parameters.rb', line 37

def permitted_checkout_delivery_attributes
  permitted_attributes.checkout_delivery_attributes
end

#permitted_checkout_payment_attributesObject



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

def permitted_checkout_payment_attributes
  permitted_attributes.checkout_payment_attributes
end

#permitted_credit_card_update_attributesObject



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

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

#permitted_order_attributesObject



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

def permitted_order_attributes
  permitted_checkout_address_attributes +
  permitted_checkout_delivery_attributes +
  permitted_checkout_payment_attributes +
  permitted_checkout_confirm_attributes + [
    line_items_attributes: permitted_line_item_attributes
  ]
end

#permitted_payment_attributesObject



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

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

#permitted_product_attributesObject



58
59
60
61
62
# File 'lib/spree/core/controller_helpers/strong_parameters.rb', line 58

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

#permitted_source_attributesObject



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

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

#permitted_user_attributesObject



64
65
66
67
68
69
# File 'lib/spree/core/controller_helpers/strong_parameters.rb', line 64

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