undefined method `comments' for #<Post:0x19f3d70>

I'm just started to learn RoR and kind of stuck here. I was doing one of the guides here. I'm totally don't know how to debug Rails applications yet, so your advices are highly appreciated. Or probably you have came across this error before.

How do I debug this? where should I look at?


You probably miss a has_many :comments in your Post class.

Now you may accept it :)

If you are working with rails 3.2.1 add :comments to attr_accessible

attr_accessible :text, :title, :comments

Need Your Help

Generate random number without srand

c++ random

I need to generate a random number with srand. I used :

UITabBar item wont select

ios iphone uitabbar

I have separate icons for unselected and selected (white). The First and the Events tab bar items do not change images when selected but the rest do. If anyone can help that would be wonderful. I h...