https://bugzilla.novell.com/show_bug.cgi?id=457596
User abauer@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=457596#c11
--- Comment #11 from Andreas Bauer 2009-03-23 08:02:48 MST ---
Finally I found the reason for this behavior.
Marcus nearly found the problem, it's indeed Array#count. Prior to ruby 1.8.7,
the standard Array#count didn't exist. From 1.8.7, Array#count is an alias to
Array#length.
The Rails AssociationProxy, which is returned by association methods as
Role#static_permissions, is essentially an enhanced Array that defines its own
#count. In Rails versions prior to 2.2.x, the AssociationProxy#count method was
only invoked if the Array class had no #count method of it's own.
Thus the suddenly changed behavior. It only affects combinations of ruby >=
1.8.7 with rails < 2.2.0
See rails ticket
http://rails.lighthouseapp.com/projects/8994/tickets/831-count-on-habtms-bro...
for more information
For the affected installations I suggest undefining the count method with the
following lines in config/environment/production_slave.rb:
class ::Array
undef_method :count if defined? :count
end
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.