1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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

This commit is contained in:
Jon Leighton 2011-12-24 00:33:05 +00:00
parent 35202aa691
commit 13945b06cc
2 changed files with 7 additions and 0 deletions

View file

@ -6,6 +6,8 @@ module ActiveRecord
end
def self.included(base)
return if base < Tag
base.class_eval do
include Tag

View file

@ -65,6 +65,11 @@ class InclusionUnitTest < ActiveRecord::TestCase
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