Open
Description
I believe this commit, which changed from prepend
to extend
, broke the conditional support. I noticed this when trying to upgrade jsonapi_compliable - my if
procs no longer get called, which broke extra_fields
support.
The expectation is that I will get this overridden #requested_attributes, but debugging the code I see this is never called. The original #requested_attributes method is called.
I'm not sure how specs are passing, because this script mimics the same pattern and illustrates the problem:
class Foo
def bar
'original bar'
end
end
module Mix
def self.extended(klass)
klass.class_eval do
include InstanceMethods
end
end
module InstanceMethods
def bar
'overridden bar'
end
end
end
Foo.extend Mix
puts Foo.new.bar #=> 'original'
Metadata
Metadata
Assignees
Labels
No labels