No one was able to answer Rich Collins's question:

I have a strange issue where my classes are somehow being corrupted by a user request:

Internal protocol error: You have a nil object when you didn't expect it!
The error occured while evaluating nil.has_key?
Backtrace:
(eval):1:in `title'
/home/rcollins/myapp/../lib/rails_ext/acts_as_versioned.rb:401:in `write_changed_attribute'

Here is the code:

def write_changed_attribute(attr_name, value)
last_value = self.send(attr_name)

How can I debug the eval?

People succeed in answering Rich Collins's questions 37% of the time (32 successes in 86 attempts).

Answers by: kris

kris's Answer:

Reply by kris 827 days ago

When you say "somehow being corrupted by a user request" do you mean a malicious request or all requests?

It sounds like when the model is attempting to evaulate the getter for the attribute named "title" that it is checking if a hash which is null has a key.

First, make sure attr-Name is "title", and if it isn't then figure out what it is, and then place a breakpoint in the accessor for attr_name in your model.

Let me know if that makes any sence, probably already thought of, or tryed some of it if it does ;).

Reply by Rich Collins 827 days ago

Hmm I forgot what I was asking about. Should have closed this one. [The plugin is done](http://acts_as_voteable.richcollins.net/)