Hisham Malik Hisham Malik - 10 months ago 90
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.