2021-09-13から1日間の記事一覧
ルーティングの設定 resources :boards do resources :comments, only: %i[create], shallow: true end コントローラの設定 app/controllers/boards_controller.rb def edit; end def update if @board.update(board_params) redirect_to @board, success: t…
ルーティングの設定 resources :boards do resources :comments, only: %i[create], shallow: true end コントローラの設定 app/controllers/boards_controller.rb def edit; end def update if @board.update(board_params) redirect_to @board, success: t…