app/controllers/user_trainings_controller.rb
# Strong parameters checking for mass-assignment of a UserTraining instance.
# Returns the whitelisted, filtered params Hash.
Strong parameters checking for mass-assignment of a UserTraining instance.
Returns the whitelisted, filtered params Hash.
Strong parameters checking for mass - assignment of a UserTraining instance . Returns the whitelisted filtered params Hash .
def user_training_params
    params
      .require( :user_training )
      .permit(
        :description,
        :user_id,
        user_training_rows_attributes: [
          :part_order,
          :group_id, :group_times, :group_start_and_rest, :group_pause,
          :times, :distance, :start_and_rest, :pause,
          :user_training_id, :exercise_id, :training_step_type_id,
          :arm_aux_type_id, :kick_aux_type_id, :body_aux_type_id, :breath_aux_type_id
        ],
        user_training_story_attributes: [
          :swam_date, :total_training_time, :notes,
          :user_training_id, :swimming_pool_id, :swimmer_level_type_id
        ]
      )
  end
def user_training_params params . require ( :user_training ) . permit ( :description , :user_id , user_training_rows_attributes : [ :part_order , :group_id , :group_times , :group_start_and_rest , :group_pause , :times , :distance , :start_and_rest , :pause , :user_training_id , :exercise_id , :training_step_type_id , :arm_aux_type_id , :kick_aux_type_id , :body_aux_type_id , :breath_aux_type_id ] , user_training_story_attributes : [ :swam_date , :total_training_time , :notes , :user_training_id , :swimming_pool_id , :swimmer_level_type_id ] ) end
Strong parameters checking for mass-assignment of a UserTraining instance.
Strong parameters checking for mass - assignment of a UserTraining instance .