Results 1 to 6 of 6
Thread: Page 192 v.story not working
Apr 6, 2007, 02:42 #1
- Join Date
- Mar 2002
- Perth, Western Australia
- 0 Post(s)
- 0 Thread(s)
Page 192 v.story not working
Working through the book - so far so good up until this annoyance...
On page 192 in the console where you type:
v = Vote.find(:first) followed by
I get this error on v.story ( below )
All that has happened so far in Chapter 7 is creating the vote table ( done and OK ) and added 'has_many :votes' in story.rb &
'belongs_to :story' in vote.rb, so not much to go wrong !!!!
Any thoughts welcome !
NoMethodError: undefined method `story' for #<Vote:0x47a6b0c>
from c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1860:in `method_miss
>> belongs_to :story
NoMethodError: undefined method `belongs_to' for #<Object:0x294f9ec>
Last edited by mattymcg; May 1, 2007 at 21:48.