質問編集履歴
2
スペルミスなどあったため修正していたら、エラー内容が変わったため修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -8,10 +8,9 @@
|
|
8
8
|
<%= link_to image_tag(prototype.image, class: :card__img ), prototype_path(prototype) %>
|
9
9
|
```
|
10
10
|
と記述し実行したところ、
|
11
|
-
**
|
11
|
+
**ArgumentError in Prototype#index**
|
12
12
|
|
13
|
-
**
|
13
|
+
**Can't resolve image into URL: to_model delegated to attachment, but attachment is nil**
|
14
|
-
Did you mean? prototype_index_path**
|
15
14
|
|
16
15
|
とエラー表示されました。
|
17
16
|
|
1
prototype_pathの場所について追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -104,6 +104,14 @@
|
|
104
104
|
end
|
105
105
|
end
|
106
106
|
```
|
107
|
+
routes.rb
|
108
|
+
```
|
109
|
+
Rails.application.routes.draw do
|
110
|
+
devise_for :users
|
111
|
+
root to: 'prototype#index'
|
112
|
+
resources :prototype,only: [:index,:new,:create]
|
113
|
+
end
|
114
|
+
```
|
107
115
|
### 試したこと
|
108
116
|
|
109
117
|
アソシエーションが間違っているために、prototype.imageで取得できていないのだと思い、アソシエーションの見直しを行いましたが、間違いが発見できませんでした。
|