回答編集履歴

1

エラーの根本的な

2017/08/09 16:04

投稿

hellomartha
hellomartha

スコア329

test CHANGED
@@ -5,3 +5,19 @@
5
5
  <input name=user["name"] value="<%= @user.name %>" class="form-control">
6
6
 
7
7
  ```
8
+
9
+
10
+
11
+ 【追記】
12
+
13
+ 表題のエラーはformから送ったパラメータと
14
+
15
+ 受ける側のuser_paramsの期待するパラメータの形が違うためにエラーになっています。
16
+
17
+ ```ruby
18
+
19
+ params.require(:user).permit(:avatar, :name, :email, :phone_number, :description)
20
+
21
+ # {"user" => {"avater" => hoge, "name" =>fuga ..., "description" => piyo}のような形のパラメータを期待
22
+
23
+ ```