RubyMoney/money-rails

Rails 6.1 deprecation

szechyjs opened this issue · 2 comments

DEPRECATION WARNING: update_attributes is deprecated and will be removed from Rails 6.1 (please, use update instead) (called from block (3 levels) in <top (required)> at /code/money-rails/spec/active_record/monetizable_spec.rb:190)
DEPRECATION WARNING: update_attributes is deprecated and will be removed from Rails 6.1 (please, use update instead) (called from block (3 levels) in <top (required)> at /code/money-rails/spec/active_record/monetizable_spec.rb:76)
DEPRECATION WARNING: update_attributes is deprecated and will be removed from Rails 6.1 (please, use update instead) (called from block (3 levels) in <top (required)> at /code/money-rails/spec/active_record/monetizable_spec.rb:418)
DEPRECATION WARNING: update_attributes is deprecated and will be removed from Rails 6.1 (please, use update instead) (called from block (3 levels) in <top (required)> at /code/money-rails/spec/active_record/monetizable_spec.rb:419)

Very soon update_attributes will be removed from rails. Fortunately it's only used in specs, unfortunately the replacement update is not available until rails v4 (currently money-rails still supports rails 3).

I see, thank you for flagging this 👍 It's probably time to drop support for older Rails versions

@antstorm It looks like
current_adapter = ::ActiveRecord::Base.connection_config[:adapter]
in money-rails/hooks.rb may also be causing a deprecation warning:

DEPRECATION WARNING: connection_config is deprecated and will be removed from Rails 6.2 (Use connection_db_config instead)