fixed an inheritance problem with ExtendedDocument subclasses
This commit is contained in:
parent
9c46546b39
commit
661daac473
|
@ -6,9 +6,6 @@ module CouchRest
|
||||||
|
|
||||||
def self.included(base)
|
def self.included(base)
|
||||||
base.extend(ClassMethods)
|
base.extend(ClassMethods)
|
||||||
base.send(:extlib_inheritable_accessor, :design_doc)
|
|
||||||
base.send(:extlib_inheritable_accessor, :design_doc_slug_cache)
|
|
||||||
base.send(:extlib_inheritable_accessor, :design_doc_fresh)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
module ClassMethods
|
module ClassMethods
|
||||||
|
|
|
@ -9,7 +9,7 @@ module CouchRest
|
||||||
|
|
||||||
def self.included(base)
|
def self.included(base)
|
||||||
base.class_eval <<-EOS, __FILE__, __LINE__
|
base.class_eval <<-EOS, __FILE__, __LINE__
|
||||||
extlib_inheritable_accessor(:properties)
|
extlib_inheritable_accessor(:properties) unless self.respond_to?(:properties)
|
||||||
self.properties ||= []
|
self.properties ||= []
|
||||||
EOS
|
EOS
|
||||||
base.extend(ClassMethods)
|
base.extend(ClassMethods)
|
||||||
|
|
Loading…
Reference in a new issue