new is_a? function isn't working
Reported by Bryan Larsen | January 25th, 2010 @ 04:09 PM | in Hobo 1.0 - Final
Barquin's standard-report doesn't work with the latest version
of Hobo, one of their lifecycle validations blows up. Stepping into
it, it's blowing up when ActiveRecord calls
.is_a?(Array)
on a collection. It should be returning
true but it's returning false. This isn't surprising:
>> Array.is_a?(Array)
=> false
Comments and changes to this ticket
-
Bryan Larsen January 25th, 2010 @ 04:10 PM
one possible solution:
def is_a?(klass) [].is_a?(klass) end
-
Bryan Larsen January 25th, 2010 @ 04:11 PM
another possible. More general, but probably wrong
def is_a?(klass) klass==self.class || super(klass) end
-
Bryan Larsen January 25th, 2010 @ 04:14 PM
- State changed from new to resolved
(from [24bc1e3aee170af0f19ae7a1d4ef72cd274a65ce]) [#610 state:resolved] fix the new is_a? for AssociationCollection http://github.com/tablatom/hobo/commit/24bc1e3aee170af0f19ae7a1d4ef...
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
People watching this ticket
Referenced by
- 610 new is_a? function isn't working (from [24bc1e3aee170af0f19ae7a1d4ef72cd274a65ce]) [#610 s...