Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes #251 table_exists? deprecation warning with Rails 5.0 #252

Merged
merged 3 commits into from Jan 26, 2017

Conversation

zharikovpro
Copy link
Contributor

No description provided.

@@ -4,7 +4,12 @@ def self.call(caller_class, column, sequential_updates_option)
define_method :sequential_updates? do
if !defined?(@sequential_updates)
if sequential_updates_option.nil?
table_exists = caller_class.connection.table_exists?(caller_class.table_name)
table_exists =
if defined?(caller_class.connection.data_source_exists?)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'd rather be more explicit about why we're forking in the code here. Can we use if ActiveRecord::VERSION::MAJOR >= 5 instead? Then we know we can remove this in the future if we drop Rails < 5 support.

@brendon
Copy link
Owner

brendon commented Jan 26, 2017

Thanks @zharikovpro :) Just one tweak and we'll be done with this. I searched and we're doing the same thing in the test harness too (def teardown).

@zharikovpro
Copy link
Contributor Author

@brendon sure, done.

@brendon
Copy link
Owner

brendon commented Jan 26, 2017

Thanks @zharikovpro :) Great work as usual!

@brendon brendon merged commit f9b40e1 into brendon:master Jan 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants