質問編集履歴

2

仮説を追加

2021/01/13 08:56

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -188,4 +188,16 @@
188
188
 
189
189
  足りない情報があれば教えていただきたいです。
190
190
 
191
+
192
+
193
+ 個人的には、logに含まれる
194
+
195
+ ```ここに言語を入力
196
+
197
+ Unpermitted parameter: :id
198
+
199
+ ```
200
+
201
+ がきになるのですが、これは何者でしょうか?
202
+
191
203
  原因がわかれば、お力添えいただきたいです。よろしくお願いいたします。

1

logの情報を追加

2021/01/13 08:56

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -116,6 +116,74 @@
116
116
 
117
117
 
118
118
 
119
+ ```log
120
+
121
+ Started PATCH "/properties/10" for 172.18.0.1 at 2021-01-13 08:22:29 +0000
122
+
123
+ Cannot render console from 172.18.0.1! Allowed networks: 127.0.0.0/127.255.255.255, ::1
124
+
125
+ Processing by PropertiesController#update as HTML
126
+
127
+ Parameters: {"authenticity_token"=>"ua3FliJrkPp0pZa2tHECWtJTUWngU3LXEy3T+A6tnHfvIfsf+ybHPXGGNzH/darZeFeEJcsY3EMVzmV8q33KrQ==", "property"=>{"name"=>"kamana", "property_overview_attributes"=>{"address"=>"アップデートできないのはなぜ?", "postal_code"=>"198738", "date_of_build"=>"2021-01-06", "id"=>"10"}}, "commit"=>"Save Changes", "id"=>"10"}
128
+
129
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
130
+
131
+ ↳ app/helpers/sessions_helper.rb:9:in `current_user'
132
+
133
+ UserAuthorization Exists? (0.3ms) SELECT 1 AS one FROM "user_authorizations" WHERE "user_authorizations"."user_id" = $1 AND "user_authorizations"."controller" = $2 AND "user_authorizations"."action" = $3 LIMIT $4 [["user_id", 1], ["controller", "properties"], ["action", "update"], ["LIMIT", 1]]
134
+
135
+ ↳ app/controllers/application_controller.rb:22:in `check_authorization'
136
+
137
+ Property Load (0.2ms) SELECT "properties".* FROM "properties" WHERE "properties"."id" = $1 LIMIT $2 [["id", 10], ["LIMIT", 1]]
138
+
139
+ ↳ app/controllers/properties_controller.rb:30:in `update'
140
+
141
+ Unpermitted parameter: :id
142
+
143
+  (0.5ms) BEGIN
144
+
145
+ ↳ app/controllers/properties_controller.rb:32:in `update'
146
+
147
+ PropertyOverview Load (0.6ms) SELECT "property_overviews".* FROM "property_overviews" WHERE "property_overviews"."property_id" = $1 LIMIT $2 [["property_id", 10], ["LIMIT", 1]]
148
+
149
+ ↳ app/controllers/properties_controller.rb:32:in `update'
150
+
151
+ PropertyOverview Destroy (0.6ms) DELETE FROM "property_overviews" WHERE "property_overviews"."id" = $1 [["id", 10]]
152
+
153
+ ↳ app/controllers/properties_controller.rb:32:in `update'
154
+
155
+ Property Destroy (0.9ms) DELETE FROM "properties" WHERE "properties"."id" = $1 [["id", 10]]
156
+
157
+ ↳ app/controllers/properties_controller.rb:32:in `update'
158
+
159
+ PropertyOverview Exists? (0.5ms) SELECT 1 AS one FROM "property_overviews" WHERE "property_overviews"."address" = $1 LIMIT $2 [["address", "アップデートできないのはなぜ?"], ["LIMIT", 1]]
160
+
161
+ ↳ app/controllers/properties_controller.rb:32:in `update'
162
+
163
+  (0.4ms) ROLLBACK
164
+
165
+ ↳ app/controllers/properties_controller.rb:32:in `update'
166
+
167
+ Rendering properties/edit.html.erb within layouts/application
168
+
169
+ Rendered layouts/_side.html.erb (Duration: 0.2ms | Allocations: 68)
170
+
171
+ Rendered shared/_error_message.html.erb (Duration: 0.1ms | Allocations: 5)
172
+
173
+ Rendered properties/_form.html.erb (Duration: 5.0ms | Allocations: 1381)
174
+
175
+ Rendered properties/edit.html.erb within layouts/application (Duration: 8.7ms | Allocations: 1584)
176
+
177
+ [Webpacker] Everything's up-to-date. Nothing to do
178
+
179
+ Rendered layouts/_rails_default.html.erb (Duration: 43.6ms | Allocations: 13894)
180
+
181
+ Completed 200 OK in 133ms (Views: 57.1ms | ActiveRecord: 14.2ms | Allocations: 38662)
182
+
183
+ ```
184
+
185
+
186
+
119
187
  createやdestroyなど、他のアクションは期待通りに動いています。
120
188
 
121
189
  足りない情報があれば教えていただきたいです。