teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

reception.update!(item)を追加させて頂きました

2021/03/03 03:54

投稿

azumaken
azumaken

スコア14

title CHANGED
File without changes
body CHANGED
@@ -7,6 +7,7 @@
7
7
  ActiveRecord::Base.transaction do
8
8
  month_params.each do |id,item|
9
9
   reception = Reception.find(id)
10
+ reception.update!(item)
10
11
  end
11
12
  end
12
13
   flash[:notice] = "指定日の受付に成功しました"
@@ -25,6 +26,7 @@
25
26
  ActiveRecord::Base.transaction do
26
27
  month_params.each do |id,item|
27
28
   reception = Reception.find(id)
29
+ reception.update!(item)
28
30
    flash[:notice] = "指定日の受付に成功しました"
29
31
    redirect_to @user and return
30
32
   end