I have an ActiveRecord class with a virtual date field. Which is to say, I've defined a birthday method and a birthday= method, but the date is actually stored in a different format in the table so there's no actual "birthday" column.
I used a date_select with attribute name "birthday" and I get the stack trace below. I guess it's not obvious what the data type of that virtual field is. So first, I wish it game a more useful error than nil.klass (something like 'I can't figure out the data type of field 'birthday', please use ... to specify it'). And second, I wish there was a way for me to specify the data type somehow, or that date_select could somehow automatically indicate that the data type is Time.
Thanks,
Aaron
NoMethodError (You have a nil object when you didn't expect it!
The error occurred while evaluating nil.klass):
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:2082:in `execute_callstack_for_multiparameter_attributes'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:2081:in `each'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:2081:in `execute_callstack_for_multiparameter_attributes'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:2074:in `assign_multiparameter_attributes'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1675:in `attributes='
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1591:in `update_attributes'
...