Changing CouchRest::ExtendedDocument to allow chaining the inherit class callback

This commit is contained in:
Marcos Tapajós 2010-02-26 21:39:09 -03:00
parent b1f4040a44
commit 17dac85a02
4 changed files with 45 additions and 2 deletions

View file

@ -21,9 +21,11 @@ module CouchRest
end
def self.inherited(subklass)
super
subklass.send(:include, CouchRest::Mixins::Properties)
subklass.class_eval <<-EOS, __FILE__, __LINE__ + 1
def self.inherited(subklass)
super
subklass.properties = self.properties.dup
end
EOS