Ruby on Rails Friday, April 1, 2011

No no, the exactly error is "undefined method `sequence' for
nil:NilClass".

It looks I am getting the database object in var "high", but I can't to
get individual items from this object (like "sequence" or "name"). When
I am trying to print the sequence (puts high.sequence), I am getting
error "undefined method `sequence' for nil:NilClass".


If I look to data stored in database, I see:


{ "_id" : ObjectId("4d94f53fd3d8496acd00000d"), "name" : "John",
"surname" : "Smith", "level" : 0, "sequence" : 0 }


So I am a bit confused, where could be fail

--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment