質問編集履歴
1
追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -5,10 +5,17 @@
|
|
5
5
|
string型を変更したりと色々試したのですが、原因が全く掴めません。
|
6
6
|
ぜひ本エラーに関してご教授いただけたらと思います。宜しくお願い致します。
|
7
7
|
|
8
|
+
#作業手順
|
9
|
+
1,投稿機能の実装(new.html.haml)完了後に編集ページ(edit.html.haml)を作成。
|
10
|
+
2,items_controllerにset_itemの部分を記述。
|
11
|
+
3,作成したedit.html.hamlページへnew.html.hamlの内容をコピペし、ページへ遷移すると下記のエラーが発生。
|
12
|
+
|
13
|
+
|
8
14
|
#エラー
|
9
15
|
app/views/items/edit.html.haml where line #19 raised:
|
10
16
|
|
11
17
|
undefined method `url' for "#<ActionDispatch::Http::UploadedFile:0x00007fd2eb425c50>":String
|
18
|
+
= image_tag image.src.url, data: { index: i }, width: "100", height: '100'
|
12
19
|
|
13
20
|
#コード
|
14
21
|
|