Hisham Malik Hisham Malik - 1 year ago 140
Ruby Question

What is NoMethodError in rails?

I am not a newbie in rails so this is embarassing but I keep getting a nomethoderror I don't know what s happening.

this is the error

enter image description here

and this is my controller

enter image description here

Answer Source

In find_item you are setting @post, not @item, which makes it nil on the view.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download