Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit f75c1f7c2c45d7ded170d76705c172e6af818bc8 1 parent dcdbb3c
Dan Kubb dkubb authored
2  lib/virtus/module_extensions.rb
View
@@ -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
8 spec/integration/using_modules_spec.rb
View
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.