Use the right ActiveRecord::Base module.

This commit is contained in:
Mauro Otonelli 2017-06-01 16:32:21 -03:00
parent 9755bc55dc
commit b56783f267

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