質問編集履歴
1
routes.rbとlog/development.log の該当部分を記載いたしました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -78,6 +78,30 @@
|
|
78
78
|
|
79
79
|
### 該当のソースコード
|
80
80
|
|
81
|
+
route.rb
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
```
|
86
|
+
|
87
|
+
Rails.application.routes.draw do
|
88
|
+
|
89
|
+
resources :folders do
|
90
|
+
|
91
|
+
resources :records do
|
92
|
+
|
93
|
+
resources :memos
|
94
|
+
|
95
|
+
end
|
96
|
+
|
97
|
+
end
|
98
|
+
|
99
|
+
devise_for :users
|
100
|
+
|
101
|
+
end
|
102
|
+
|
103
|
+
```
|
104
|
+
|
81
105
|
|
82
106
|
|
83
107
|
**モデル**
|
@@ -292,6 +316,48 @@
|
|
292
316
|
|
293
317
|
```
|
294
318
|
|
319
|
+
log/development.log
|
320
|
+
|
321
|
+
```
|
322
|
+
|
323
|
+
Started GET "/folders/3/records/3/memos/22/edit" for 122.222.88.207 at 2022-01-06 13:47:00 +0000
|
324
|
+
|
325
|
+
Cannot render console from 122.222.88.207! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
|
326
|
+
|
327
|
+
Processing by MemosController#edit as HTML
|
328
|
+
|
329
|
+
Parameters: {"folder_id"=>"3", "record_id"=>"3", "id"=>"22"}
|
330
|
+
|
331
|
+
[1m[36mUser Load (0.1ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
|
332
|
+
|
333
|
+
↳ /home/ec2-user/.rvm/gems/ruby-2.6.3/gems/activerecord-5.2.6/lib/active_record/log_subscriber.rb:98
|
334
|
+
|
335
|
+
[1m[36mFolder Load (0.1ms)[0m [1m[34mSELECT "folders".* FROM "folders" WHERE "folders"."user_id" = ? AND "folders"."id" = ? LIMIT ?[0m [["user_id", 1], ["id", 3], ["LIMIT", 1]]
|
336
|
+
|
337
|
+
↳ app/controllers/memos_controller.rb:49
|
338
|
+
|
339
|
+
[1m[36mRecord Load (0.1ms)[0m [1m[34mSELECT "records".* FROM "records" WHERE "records"."folder_id" = ? AND "records"."id" = ? LIMIT ?[0m [["folder_id", 3], ["id", 3], ["LIMIT", 1]]
|
340
|
+
|
341
|
+
↳ app/controllers/memos_controller.rb:54
|
342
|
+
|
343
|
+
[1m[36mMemo Load (0.2ms)[0m [1m[34mSELECT "memos".* FROM "memos" WHERE "memos"."record_id" = ? AND (22) LIMIT ?[0m [["record_id", 3], ["LIMIT", 1]]
|
344
|
+
|
345
|
+
↳ app/controllers/memos_controller.rb:59
|
346
|
+
|
347
|
+
Rendering memos/edit.html.erb within layouts/application
|
348
|
+
|
349
|
+
Rendered memos/_form.html.erb (8.8ms)
|
350
|
+
|
351
|
+
Rendered memos/edit.html.erb within layouts/application (11.0ms)
|
352
|
+
|
353
|
+
Rendered layouts/_header.html.erb (0.7ms)
|
354
|
+
|
355
|
+
Completed 200 OK in 128ms (Views: 116.1ms | ActiveRecord: 0.5ms)
|
356
|
+
|
357
|
+
```
|
358
|
+
|
359
|
+
ここでは "id"=>"22" となっていますが、実際のeditの表示はid=18の表示になっています。
|
360
|
+
|
295
361
|
|
296
362
|
|
297
363
|
### 試したこと
|