This project is archived and is in readonly mode.

#2332 ✓invalid
geno

Broken methods for habtm relation on thin webserver

Reported by geno | March 25th, 2009 @ 12:08 AM | in 2.x

On a habtm relation some methods like "each" and "delete" dont work, but just for the thin webserver.

I got the following message: You have a nil object when you didn't expect it! You might have expected an instance of Array. The error occurred while evaluating nil.include?

With the following trace: /usr/lib64/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/attribute_methods.rb:142:in create_time_zone_conversion_attribute?' /usr/lib64/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/attribute_methods.rb:75:indefine_attribute_methods' /usr/lib64/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/attribute_methods.rb:71:in each' /usr/lib64/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/attribute_methods.rb:71:indefine_attribute_methods' /usr/lib64/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/attribute_methods.rb:242:in method_missing

Example source: instance.comments.delete(@comment)

Where instance is a class with habtm relation, comments is the relation and @comment is a instance of a comment.

In console, functional test and mongrel it works. But I still think its 2.3 related and not a true thin server problem.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Pages