mirror of
https://github.com/DatabaseCleaner/database_cleaner
synced 2023-03-27 23:22:03 -04:00
Merge pull request #415 from pschambacher/rails5.0
Remove deprecation warning for Rails 5.0
This commit is contained in:
commit
f318781a77
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue