-
Notifications
You must be signed in to change notification settings - Fork 12
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
connection_config -> connection_db_config #17
Conversation
DEPRECATION WARNING: connection_config is deprecated and will be removed from Rails 6.2 (Use connection_db_config instead)
OK, I'll look for the gem version branching |
Hello, I've added version branching to select either |
done |
Thanks for the reactivity ! |
Yep, merged to appreciate your work! |
Hello @alekseyl Unfortunately I'm having a bug with this due to I'm not sure what version of ActiveRecord this was introduced in, but I'm using version 6.1.4.1. I can't tell if def ar_using_pg_adapter?
return false unless defined?(::ActiveRecord::Base)
binding.pry
config = ActiveRecord::Base.try(:connection_db_config) || ActiveRecord::Base.try(:connection_config)
(config.try(:adapter) || config&.dig('adapter')) == 'postgresql'
end It's just to avoid deprecation warning for now so not urgent. If you'd like I can put together a PR for youu |
* Fix to issue #17 (comment). ActiveRecord base config is no longer a hash, so it does not have dig method, hence it's breaking the ar_using_pg_adapter? method. * active_record added as development dependency :( for proper testing cover.
fixed in version 0.2.0! |
DEPRECATION WARNING: connection_config is deprecated and will be removed from Rails 6.2 (Use connection_db_config instead)