Resolve deprecation warnings
There are very many deprecation warnings returned during deployment clogging the logs. Let get rid of these.
Current master build: https://travis-ci.org/internetee/registry/builds/647285407
- [x] /home/travis/build/internetee/registry/app/models/payment_orders/bank_link.rb:92: warning: BigDecimal.new is deprecated; use BigDecimal() method instead.
- [x] The behavior of
changed_attributesinside of after callbacks will be changing in the next version of Rails. The new return value will reflect the behavior of calling the method aftersavereturned (e.g. the opposite of what it returns now). To maintain the current behavior, usesaved_changes.transform_values(&:first)instead. (called from update_related_whois_records at /home/travis/build/internetee/registry/app/models/contact.rb:487) - [x] The behavior of
changesinside of after callbacks will be changing in the next version of Rails. The new return value will reflect the behavior of calling the method aftersavereturned (e.g. the opposite of what it returns now). To maintain the current behavior, usesaved_changesinstead. (called from update_related_whois_records at /home/travis/build/internetee/registry/app/models/contact.rb:487) - [x] The behavior of
changedinside of after callbacks will be changing in the next version of Rails. The new return value will reflect the behavior of calling the method aftersavereturned (e.g. the opposite of what it returns now). To maintain the current behavior, usesaved_changes.keysinstead. (called from update_related_whois_records at /home/travis/build/internetee/registry/app/models/contact.rb:487) - [x] The behavior of
attribute_changeinside of after callbacks will be changing in the next version of Rails. The new return value will reflect the behavior of calling the method aftersavereturned (e.g. the opposite of what it returns now). To maintain the current behavior, usesaved_change_to_attributeinstead. (called from update_related_whois_records at /home/travis/build/internetee/registry/app/models/contact.rb:487) - [x] The behavior of
attribute_changed?inside of after callbacks will be changing in the next version of Rails. The new return value will reflect the behavior of calling the method aftersavereturned (e.g. the opposite of what it returns now). To maintain the current behavior, usesaved_change_to_attribute?instead. (called from update_related_whois_records at /home/travis/build/internetee/registry/app/models/contact.rb:487)
The main bunch of changed deprecated warnings comes form the papertrail gem - so we need either pump it's version to latest (requires some refactoring due to papertrail API changes) or get rid of it completely.
Getting rid of papertrail is not possible at the moment because we have nothing to replace it with. So refactoring it is unless it's multi-day undertaking
The refactoring will take from a couple of hours to a couple of days.
But I've silenced them by setting config.active_support.deprecation = :silence in config/environments/test.rb. Note - they are not resolved, just silenced.
Courtesy of https://github.com/internetee/registry/pull/1522