You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
455 B

4 months ago
4 months ago
  1. class StrongController < ApplicationController
  2. def index
  3. logger.info('Live::Constant ')
  4. end
  5. def update
  6. logger.info 'parameters', strong_params
  7. redirect_to strong_path, notice: 'form is ok'
  8. end
  9. private
  10. def strong_params
  11. # params.require(:strong).permit [:name, :surname, { birth: {} }] # implicit: any fields inside bith
  12. params.require(:strong).permit [:name, :surname, { birth: %i[date location] }] # explicit
  13. end
  14. end