I'm walking through an example in the "Head First Rails" book, but,
instead doing the examples using Rails3.0.0.rc.
But, I'm getting this error when browsing for example:
undefined method `eq' for nil:NilClass
For an error like this it is better to show the full error trace, but
first look at it yourself. Somewhere there you will usually find a
reference to a line of your code. Look carefully at that line and the
error and try and work out the problem yourself. The error is saying
that you are trying to call a method on an object that is nil. A
common cause of this is using the result of a find operation without
checking that it did in fact find a record.
If you still cannot see the problem then post the error trace and the
code around the error.
Provided that my advs_controller.rb is as follows:
For only a few lines of code it is better in my opinion to put it
inline rather than a pastie. Particularly consider those who may find
the thread in months and years yet to come, hoping for enlightenment,
only to find that the pastie has disappeared.