Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Don't include anything else if AR::Model has already been included

  • Loading branch information...
commit 13945b06ccde6979b10fce6fe68312077593f124 1 parent 35202aa
@jonleighton jonleighton authored
View
2  activerecord/lib/active_record/model.rb
@@ -6,6 +6,8 @@ module Tag #:nodoc:
end
def self.included(base)
+ return if base < Tag
+
base.class_eval do
include Tag
View
5 activerecord/test/cases/inclusion_test.rb
@@ -65,6 +65,11 @@ def test_mirrored_configuration
ensure
ActiveRecord::Base.time_zone_aware_attributes = false
end
+
+ # Doesn't really test anything, but this is here to ensure warnings don't occur
+ def test_included_twice
+ @klass.send :include, ActiveRecord::Model
+ end
end
class InclusionFixturesTest < ActiveRecord::TestCase
Please sign in to comment.
Something went wrong with that request. Please try again.