Hisham Malik Hisham Malik - 11 days ago 8
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

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

Comments