Merge pull request #490 from mauro-oto/use-right-activerecord-base-module

Use the right ActiveRecord::Base module.
This commit is contained in:
Ernesto Tagwerker 2017-06-02 07:27:32 -04:00 committed by GitHub
commit 40e084e9a9

View file

@ -68,7 +68,7 @@ module DatabaseCleaner
def self.exclusion_condition(column_name)
result = " #{column_name} <> '#{::DatabaseCleaner::ActiveRecord::Base.migration_table_name}' "
if ::ActiveRecord::VERSION::MAJOR >= 5
result += " AND #{column_name} <> '#{ActiveRecord::Base.internal_metadata_table_name}' "
result += " AND #{column_name} <> '#{::ActiveRecord::Base.internal_metadata_table_name}' "
end
result
end