Hi All,

I'm working on a tutorial and am already stumped on the very first
question... I can't seem to figure it out.  Here are the details:


Objective
Find Zombie where id = 1 and store it in a variable

Resources
zombies
id  name  graveyard
1  Ash  Glen Haven Memorial Cemetary
2  Bob  Chapel Hill Cemetary
3  Jim  My Fathers Basement


Here's what I've tried:

t = Zombie.find(1)
x = t.name

and here's the error I keep getting (or some similar variation):

Sorry, Try Again
#<NoMethodError: undefined method `id' for "Ash":String>


I've tried a ton of different variations, but am obviously approaching
the problem incorrectly. Can anyone help me out?

Thanks!
Ryan

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to