app/controllers/students_controller.rb
# Only allow a trusted parameter "white list" through.
Only allow a trusted parameter "white list" through.
Only allow a trusted parameter " white list " through .
def student_params
    params.require(:student).permit(%i(id first_name last_name gender date_of_birth place_of_birth course_id active) + [
      address: %i(street zip city), contact: %i(email phone mobile)
    ])
  end
def student_params params . require ( :student ) . permit ( %i( id first_name last_name gender date_of_birth place_of_birth course_id active ) + [ address : %i( street zip city ) , contact : %i( email phone mobile ) ] ) end
Only allow a trusted parameter "white list" through.
Only allow a trusted parameter " white list " through .