[Rails] Re: Why do rails calls a method when I'm calling a property?

2010-06-20 Thread Agoofin
Look at your link_to in the index.html, it should contain the id for the story you want to show. Also, check to make sure that you have the to_param method in your model, story.db and that it's correct. The author implements a complicated beautification of the urls which is a waste in the course o

Re: [Rails] Re: Why do rails calls a method when I'm calling a property?

2010-06-20 Thread Rory McKinley
On 20/06/2010 01:08, Omar Renteria wrote: But it exists...in deed when I try the same param in rails console the object is found. Are both cases (console and code running on server) running under the same environment? E.g. development vs production -- You received this message because you a

[Rails] Re: Why do rails calls a method when I'm calling a property?

2010-06-19 Thread Omar Renteria
But it exists...in deed when I try the same param in rails console the object is found. Taywin wrote: > If you look at the error "undefined method `name' for nil:NilClass," > it tells you that the error is from attempting to call a method 'name' > from nil (NULL) object. I believe Rails would at

[Rails] Re: Why do rails calls a method when I'm calling a property?

2010-06-18 Thread Taywin
If you look at the error "undefined method `name' for nil:NilClass," it tells you that the error is from attempting to call a method 'name' from nil (NULL) object. I believe Rails would attempt to look for both method and property; however, it would report as undefined 'method' if it found nil obje

[Rails] Re: Why do rails calls a method when I'm calling a property?

2010-06-17 Thread Marnen Laibow-Koser
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 throu

[Rails] Re: Why do rails calls a method when I'm calling a property?

2010-06-17 Thread Marnen Laibow-Koser
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 throu

[Rails] Re: Why do rails calls a method when I'm calling a property?

2010-06-17 Thread Omar Renteria
I would also add that the trouble is in Show view/controller. -- 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 unsubscrib