ActiveModel 3.2 was changed to only consider methods that it defines
when figuring out whether to override an accessor method. So:
class Parent
include Ripple::Document
def foo
"awesome"
end
end
class Child < Parent
property :foo
end
Child.new.foo #=> nil
This commit fixes it by reverting to the old behavior of not writing an
accessor it is already defined anywhere in the hierarchy. This does not
affect accessors created by ActiveModel itself, as those are undef'd
en masse before the method_defined? check is called.
ActiveModel 3.2 was changed to only consider methods that it defines when figuring out whether to override an accessor method. So:
class Parent include Ripple::Document
end
class Child < Parent property :foo end
Child.new.foo #=> nil
This commit fixes it by reverting to the old behavior of not writing an accessor it is already defined anywhere in the hierarchy. This does not affect accessors created by ActiveModel itself, as those are undef'd en masse before the method_defined? check is called.