jeudi 25 août 2016

undefined method `image' for #0x7d6a5a0>

I have this big problem, when I access the URL as localhost:3000/pics/new creat New post show this problème :

NoMethodError in Pics#new

Showing c:/Sites/insta/app/views/pics/_form.html.haml where line #12 raised:
undefined method `image' for #<Pic:0x7d6a5a0>
Trace of template inclusion: app/views/pics/new.html.haml
Rails.root: c:/Sites/insta

app/views/pics/_form.html.haml:12:in `block in _app_views_pics__form_html_haml___995842594_67564884'
app/views/pics/_form.html.haml:1:in `_app_views_pics__form_html_haml___995842594_67564884'
app/views/pics/new.html.haml:7:in `_app_views_pics_new_html_haml__952992882_75084336'

_form.html.haml

enter image description here

new.html.haml

enter image description here

Aucun commentaire:

Enregistrer un commentaire