Skip to content

Commit

Permalink
Merge pull request #415 from pschambacher/rails5.0
Browse files Browse the repository at this point in the history
Remove deprecation warning for Rails 5.0
  • Loading branch information
etagwerker committed Mar 11, 2016
2 parents 2840197 + 430a957 commit f318781
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/database_cleaner/active_record/truncation.rb
Expand Up @@ -27,7 +27,7 @@ def database_cleaner_view_cache

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)
Expand Down

0 comments on commit f318781

Please sign in to comment.