Permalink
Browse files

[#93] Fix module inclusion problem

* When a module includes Virtus, and then is included into another
  module an error was thrown.
  • Loading branch information...
1 parent dcdbb3c commit f75c1f7c2c45d7ded170d76705c172e6af818bc8 @dkubb dkubb committed Jun 11, 2012
Showing with 7 additions and 3 deletions.
  1. +1 −1 lib/virtus/module_extensions.rb
  2. +6 −2 spec/integration/using_modules_spec.rb
@@ -32,7 +32,7 @@ def extended(object)
# @api private
def included(object)
super
- object.send(:include, ClassInclusions)
+ object.send(:include, Virtus)
define_attributes(object)
end
@@ -3,14 +3,18 @@
describe 'I can define attributes within a module' do
before do
module Examples
- module Name
+ module Common
include Virtus
+ end
+
+ module Name
+ include Common
attribute :name, String
end
module Age
- include Virtus
+ include Common
attribute :age, Integer
end

0 comments on commit f75c1f7

Please sign in to comment.