Basically what I need is to be able to do:
But instead of an amount, I get this:
NoMethodError: undefined method `votes' for #<Post:0x4b2e7c0>
I can do this:
=> "This is the post title."
So as you can see, I am able to access the post information by
accessing a particular vote, but I can't get all votes for a single
In your Post class you need to look carfuly at your 'has_many :votes'
statement. Does it exist? Is ':votes' spelled correctly and is it a
symbol or string?
The error message you are posting has nothing to do with the database
setup, it is is saying that the Model you are using is not set up the
way you think. If this doesn't solve your problem, it would be helpful
to see the relevant code from your Post class.