質問編集履歴
2
ログを追加。
test
CHANGED
File without changes
|
test
CHANGED
@@ -378,4 +378,78 @@
|
|
378
378
|
|
379
379
|
```
|
380
380
|
|
381
|
+
フォームを送信した時のログは以下の通りです。
|
382
|
+
|
383
|
+
```ここに言語を入力
|
384
|
+
|
385
|
+
Started POST "/reviews" for 172.18.0.1 at 2020-06-25 20:52:50 +0000
|
386
|
+
|
387
|
+
Cannot render console from 172.18.0.1! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
|
388
|
+
|
389
|
+
Processing by ReviewsController#create as HTML
|
390
|
+
|
391
|
+
Parameters: {"utf8"=>"✓", "authenticity_token"=>"93R7dbCejITKT8m6U9vsXGRwyoZFYkCdnuPorhrZQceJShF7CqiHjWeDZwqX2o61OP5ll6P600aQjNbYAROnWw==", "review"=>{"score"=>"5", "title"=>"", "review"=>"hoge", "images"=>[#<ActionDispatch::Http::UploadedFile:0x00007fac64326cd0 @tempfile=#<Tempfile:/tmp/RackMultipart20200625-1-fr3buu.jpg>, @original_filename="バイオ3.jpg", @content_type="image/jpeg", @headers="Content-Disposition: form-data; name=\"review[images][]\"; filename=\"\xE3\x83\x8F\xE3\x82\x99\xE3\x82\xA4\xE3\x82\xAA\xEF\xBC\x93.jpg\"\r\nContent-Type: image/jpeg\r\n">]}, "game_id"=>"4", "commit"=>"投稿"}
|
392
|
+
|
393
|
+
[1m[36mUser Load (0.3ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2[0m [["id", 1], ["LIMIT", 1]]
|
394
|
+
|
395
|
+
↳ app/helpers/sessions_helper.rb:23
|
396
|
+
|
397
|
+
[36m Disk Storage (6.3ms) [0m[32mUploaded file to key: MKZwRH7SmEZbxnv6S2R9VzBX (checksum: NC1O8MLXS28QNfdAsUVu8g==)[0m
|
398
|
+
|
399
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
400
|
+
|
401
|
+
↳ app/controllers/reviews_controller.rb:11
|
402
|
+
|
403
|
+
[1m[36mActiveStorage::Blob Create (0.3ms)[0m [1m[32mINSERT INTO "active_storage_blobs" ("key", "filename", "content_type", "metadata", "byte_size", "checksum", "created_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["key", "MKZwRH7SmEZbxnv6S2R9VzBX"], ["filename", "バイオ3.jpg"], ["content_type", "image/jpeg"], ["metadata", "{\"identified\":true}"], ["byte_size", 19053], ["checksum", "NC1O8MLXS28QNfdAsUVu8g=="], ["created_at", "2020-06-25 20:52:50.916214"]]
|
404
|
+
|
405
|
+
↳ app/controllers/reviews_controller.rb:11
|
406
|
+
|
407
|
+
[1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
|
408
|
+
|
409
|
+
↳ app/controllers/reviews_controller.rb:11
|
410
|
+
|
411
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
412
|
+
|
413
|
+
↳ app/controllers/reviews_controller.rb:13
|
414
|
+
|
415
|
+
[1m[36mGame Load (0.2ms)[0m [1m[34mSELECT "games".* FROM "games" WHERE "games"."id" = $1 LIMIT $2[0m [["id", 4], ["LIMIT", 1]]
|
416
|
+
|
417
|
+
↳ app/controllers/reviews_controller.rb:13
|
418
|
+
|
419
|
+
[1m[36mReview Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "reviews" WHERE "reviews"."user_id" = $1 AND "reviews"."game_id" = $2 LIMIT $3[0m [["user_id", 1], ["game_id", 4], ["LIMIT", 1]]
|
420
|
+
|
421
|
+
↳ app/controllers/reviews_controller.rb:13
|
422
|
+
|
423
|
+
[1m[36mActiveStorage::Attachment Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "active_storage_attachments" WHERE "active_storage_attachments"."blob_id" = $1 LIMIT $2[0m [["blob_id", 61], ["LIMIT", 1]]
|
424
|
+
|
425
|
+
↳ app/models/review.rb:40
|
426
|
+
|
427
|
+
[1m[36mActiveStorage::Blob Destroy (0.4ms)[0m [1m[31mDELETE FROM "active_storage_blobs" WHERE "active_storage_blobs"."id" = $1[0m [["id", 61]]
|
428
|
+
|
429
|
+
↳ app/models/review.rb:40
|
430
|
+
|
431
|
+
[36m Disk Storage (0.5ms) [0m[31mDeleted file from key: MKZwRH7SmEZbxnv6S2R9VzBX[0m
|
432
|
+
|
433
|
+
[36m Disk Storage (0.9ms) [0m[31mDeleted files by key prefix: variants/MKZwRH7SmEZbxnv6S2R9VzBX/[0m
|
434
|
+
|
435
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
436
|
+
|
437
|
+
↳ app/controllers/reviews_controller.rb:13
|
438
|
+
|
439
|
+
Rendering reviews/new.html.erb within layouts/application
|
440
|
+
|
441
|
+
Rendered shared/_error_messages.html.erb (0.9ms)
|
442
|
+
|
443
|
+
Rendered reviews/_reviews_form.html.erb (14.8ms)
|
444
|
+
|
445
|
+
Rendered reviews/new.html.erb within layouts/application (24.1ms)
|
446
|
+
|
447
|
+
Rendered layouts/_header.html.erb (1.7ms)
|
448
|
+
|
449
|
+
Completed 200 OK in 179ms (Views: 148.2ms | ActiveRecord: 2.9ms)
|
450
|
+
|
451
|
+
|
452
|
+
|
453
|
+
```
|
454
|
+
|
381
455
|
どこを修正すればいいかわからないのでアドバイスを頂きたいです。よろしくお願いします。
|
1
題名のタイプミスを修正
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
Active Storageのhas_may_attachedによって添付した画像に対してカスタムバリデーション を設定したいのですが、上手くきません。
|
1
|
+
Active Storageのhas_many_attachedによって添付した画像に対してカスタムバリデーション を設定したいのですが、上手くきません。
|
test
CHANGED
File without changes
|