Skip to content

Commit

Permalink
Added logic to DataMapper::Model#append_inclusions to add inclusions …
Browse files Browse the repository at this point in the history
…to all existing Model descendants. All in-memory specs pass.
  • Loading branch information
Blake Gentry committed Oct 19, 2009
1 parent 6c93f9c commit 2e64f79
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/dm-core/model.rb
Expand Up @@ -86,6 +86,10 @@ def self.descendants
# @api semipublic
def self.append_inclusions(*inclusions)
extra_inclusions.concat inclusions
# Add the inclusion to existing descendants
self.descendants.each do |model|
inclusions.each {|inclusion| model.send :include, inclusion }
end
true
end

Expand Down

0 comments on commit 2e64f79

Please sign in to comment.