Module: Api::V1::Scaffolding::CompletelyConcrete::TangibleThingsController::StrongParameters

Included in:
Api::V1::Scaffolding::CompletelyConcrete::TangibleThingsController
Defined in:
app/controllers/api/v1/scaffolding/completely_concrete/tangible_things_controller.rb

Instance Method Summary collapse

Instance Method Details

#tangible_thing_paramsObject

Only allow a list of trusted parameters through.



44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# File 'app/controllers/api/v1/scaffolding/completely_concrete/tangible_things_controller.rb', line 44

def tangible_thing_params
  strong_params = params.require(:scaffolding_completely_concrete_tangible_thing).permit(
    *permitted_fields,
    # 🚅 skip this section when scaffolding.
    :text_field_value,
    :action_text_value,
    :boolean_button_value,
    :button_value,
    :color_picker_value,
    :cloudinary_image_value,
    :date_field_value,
    :date_and_time_field_value,
    :email_field_value,
    :file_field_value,
    :file_field_value_removal,
    :option_value,
    :password_field_value,
    :phone_field_value,
    :super_select_value,
    :text_area_value,
    # 🚅 stop any skipping we're doing now.
    # 🚅 super scaffolding will insert new fields above this line.
    *permitted_arrays,
    # 🚅 skip this section when scaffolding.
    multiple_button_values: [],
    multiple_option_values: [],
    address_value_attributes: [
      :id,
      :address_one,
      :address_two,
      :city,
      :region_id,
      :region_name,
      :country_id,
      :postal_code
    ],
    multiple_super_select_values: []
    # 🚅 stop any skipping we're doing now.
    # 🚅 super scaffolding will insert new arrays above this line.
  )

  process_params(strong_params)

  strong_params
end