Merge pull request #415 from pschambacher/rails5.0

Remove deprecation warning for Rails 5.0
This commit is contained in:
Ernesto Tagwerker 2016-03-11 15:11:22 -03:00
commit f318781a77

View file

@ -27,7 +27,7 @@ module DatabaseCleaner
def database_cleaner_table_cache
# the adapters don't do caching (#130) but we make the assumption that the list stays the same in tests
@database_cleaner_tables ||= tables
@database_cleaner_tables ||= ::ActiveRecord::VERSION::MAJOR >= 5 ? data_sources : tables
end
def truncate_table(table_name)