Class: PermittedParams
- Inherits:
-
Struct
- Object
- Struct
- PermittedParams
- Defined in:
- app/models/permitted_params.rb
Instance Attribute Summary collapse
-
#params ⇒ Object
Returns the value of attribute params.
Instance Method Summary collapse
-
#answer ⇒ Object
answer.
- #answer_attributes ⇒ Object
-
#dependency ⇒ Object
dependency.
- #dependency_attributes ⇒ Object
-
#dependency_condition ⇒ Object
dependency_condition.
- #dependency_condition_attributes ⇒ Object
-
#question ⇒ Object
question.
- #question_attributes ⇒ Object
-
#question_group ⇒ Object
question_group.
- #question_group_attributes ⇒ Object
-
#response ⇒ Object
response.
- #response_attributes ⇒ Object
-
#response_set ⇒ Object
response_set.
- #response_set_attributes ⇒ Object
- #strong_parameters ⇒ Object
-
#survey ⇒ Object
survey.
- #survey_attributes ⇒ Object
-
#survey_section ⇒ Object
survey_section.
- #survey_section_attributes ⇒ Object
-
#survey_translation ⇒ Object
survey_translation.
- #survey_translation_attributes ⇒ Object
-
#validation ⇒ Object
validation.
- #validation_attributes ⇒ Object
-
#validation_condition ⇒ Object
validation_condition.
- #validation_condition_attributes ⇒ Object
Instance Attribute Details
#params ⇒ Object
Returns the value of attribute params
1 2 3 |
# File 'app/models/permitted_params.rb', line 1 def params @params end |
Instance Method Details
#answer ⇒ Object
answer
47 48 49 |
# File 'app/models/permitted_params.rb', line 47 def answer strong_parameters.permit(*answer_attributes) end |
#answer_attributes ⇒ Object
50 51 52 |
# File 'app/models/permitted_params.rb', line 50 def answer_attributes [:question, :question_id, :text, :short_text, :help_text, :weight, :response_class, :reference_identifier, :data_export_identifier, :common_namespace, :common_identifier, :display_order, :is_exclusive, :display_length, :custom_class, :custom_renderer, :default_value, :display_type, :input_mask, :input_mask_placeholder] end |
#dependency ⇒ Object
dependency
55 56 57 |
# File 'app/models/permitted_params.rb', line 55 def dependency strong_parameters.permit(*dependency_attributes) end |
#dependency_attributes ⇒ Object
58 59 60 |
# File 'app/models/permitted_params.rb', line 58 def dependency_attributes [:question, :question_group, :question_id, :question_group_id, :rule] end |
#dependency_condition ⇒ Object
dependency_condition
63 64 65 |
# File 'app/models/permitted_params.rb', line 63 def dependency_condition strong_parameters.permit(*dependency_condition_attributes) end |
#dependency_condition_attributes ⇒ Object
66 67 68 |
# File 'app/models/permitted_params.rb', line 66 def dependency_condition_attributes [:dependency, :question, :answer, :dependency_id, :rule_key, :question_id, :operator, :answer_id, :datetime_value, :integer_value, :float_value, :unit, :text_value, :string_value, :response_other, :question_reference, :answer_reference] end |
#question ⇒ Object
question
31 32 33 |
# File 'app/models/permitted_params.rb', line 31 def question strong_parameters.permit(*question_attributes) end |
#question_attributes ⇒ Object
34 35 36 |
# File 'app/models/permitted_params.rb', line 34 def question_attributes [:survey_section, :question_group, :survey_section_id, :question_group_id, :text, :short_text, :help_text, :pick, :reference_identifier, :data_export_identifier, :common_namespace, :common_identifier, :display_order, :display_type, :is_mandatory, :display_width, :custom_class, :custom_renderer, :correct_answer_id] end |
#question_group ⇒ Object
question_group
39 40 41 |
# File 'app/models/permitted_params.rb', line 39 def question_group strong_parameters.permit(*question_group_attributes) end |
#question_group_attributes ⇒ Object
42 43 44 |
# File 'app/models/permitted_params.rb', line 42 def question_group_attributes [:text, :help_text, :reference_identifier, :data_export_identifier, :common_namespace, :common_identifier, :display_type, :custom_class, :custom_renderer] end |
#response ⇒ Object
response
87 88 89 |
# File 'app/models/permitted_params.rb', line 87 def response strong_parameters.permit(*response_attributes) end |
#response_attributes ⇒ Object
90 91 92 |
# File 'app/models/permitted_params.rb', line 90 def response_attributes [:response_set, :question, :answer, :date_value, :time_value, :response_set_id, :question_id, :answer_id, :datetime_value, :integer_value, :float_value, :unit, :text_value, :string_value, :response_other, :response_group, :survey_section_id] end |
#response_set ⇒ Object
response_set
95 96 97 |
# File 'app/models/permitted_params.rb', line 95 def response_set strong_parameters.permit(*response_set_attributes) end |
#response_set_attributes ⇒ Object
98 99 100 |
# File 'app/models/permitted_params.rb', line 98 def response_set_attributes [:survey, :responses_attributes, :user_id, :survey_id] end |
#strong_parameters ⇒ Object
3 4 5 |
# File 'app/models/permitted_params.rb', line 3 def strong_parameters ActionController::Parameters.new(params) end |
#survey ⇒ Object
survey
7 8 9 |
# File 'app/models/permitted_params.rb', line 7 def survey strong_parameters.permit(*survey_attributes) end |
#survey_attributes ⇒ Object
10 11 12 |
# File 'app/models/permitted_params.rb', line 10 def survey_attributes [:title, :description, :reference_identifier, :data_export_identifier, :common_namespace, :common_identifier, :css_url, :custom_class, :display_order] end |
#survey_section ⇒ Object
survey_section
23 24 25 |
# File 'app/models/permitted_params.rb', line 23 def survey_section strong_parameters.permit(*survey_section_attributes) end |
#survey_section_attributes ⇒ Object
26 27 28 |
# File 'app/models/permitted_params.rb', line 26 def survey_section_attributes [:survey, :survey_id, :title, :description, :reference_identifier, :data_export_identifier, :common_namespace, :common_identifier, :custom_class, :display_order] end |
#survey_translation ⇒ Object
survey_translation
15 16 17 |
# File 'app/models/permitted_params.rb', line 15 def survey_translation strong_parameters.permit(*survey_translation_attributes) end |
#survey_translation_attributes ⇒ Object
18 19 20 |
# File 'app/models/permitted_params.rb', line 18 def survey_translation_attributes [:survey, :survey_id, :locale, :translation] end |
#validation ⇒ Object
validation
71 72 73 |
# File 'app/models/permitted_params.rb', line 71 def validation strong_parameters.permit(*validation_attributes) end |
#validation_attributes ⇒ Object
74 75 76 |
# File 'app/models/permitted_params.rb', line 74 def validation_attributes [:answer, :answer_id, :rule, :message] end |
#validation_condition ⇒ Object
validation_condition
79 80 81 |
# File 'app/models/permitted_params.rb', line 79 def validation_condition strong_parameters.permit(*validation_condition_attributes) end |
#validation_condition_attributes ⇒ Object
82 83 84 |
# File 'app/models/permitted_params.rb', line 82 def validation_condition_attributes [:validation, :validation_id, :rule_key, :operator, :question_id, :answer_id, :datetime_value, :integer_value, :float_value, :unit, :text_value, :string_value, :response_other, :regexp] end |