NoMethodError: undefined method `votes' for #<Post:0x4b2e7c0>
from c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/
active_recor
d/base.rb:1792:in `method_missing'
I can do this:
v.post.title
=> "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
post.
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.