Omar Renteria wrote: > Well, I'm starting on RoR, so I got a Book called simply > rails...Following the steps in it sometimes when I try to call a > property, the browser shows me the next exception: > > undefined method `name' for nil:NilClass
That's how Ruby works: all data access is done through method calls. Unlike in Java or C++, there is no way (well, except for tricky hacks) to see an instance variable from outside the object that contains it. This is one of the best features of Ruby, since it means calling routines don't have to know whether they're asking for an instance variable or a computation. Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- 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-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.