Project

General

Profile

Refactor #22083

Rails 5.1: attribute_changed? inside model callbacks

Added by Timo Goebel over 1 year ago. Updated 9 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Discovery plugin
Target version:
-
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

These deprecations should get fixed:

ActiveSupport::DeprecationException: DEPRECATION WARNING: 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 after `save` returned (e.g. the opposite of what it returns now). To maintain the current behavior, use `saved_change_to_attribute?` instead. (called from update_notifications at /Users/f0218175/foremandev/foreman_discovery/app/models/host/managed_extensions.rb:71)

ActiveSupport::DeprecationException: DEPRECATION WARNING: 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 after `save` returned (e.g. the opposite of what it returns now). To maintain the current behavior, use `saved_change_to_attribute?` instead. (called from delete_discovery_attribute_set at /Users/f0218175/foremandev/foreman_discovery/app/models/host/managed_extensions.rb:66)
/Users/f0218175/foremandev/foreman_discovery/app/models/host/managed_extensions.rb:66:in `delete_discovery_attribute_set'


Related issues

Related to Foreman - Tracker #20948: Rails 5.1 upgrade tasksClosed2017-09-16

Related to Foreman - Tracker #21834: Rails 5.2 upgrade tasksClosed

Associated revisions

Revision b79a85e1 (diff)
Added by Michael Moll over 1 year ago

Refs #22083 - remove config/as_deprecation_whitelist.yaml

Revision d2c80151 (diff)
Added by Timo Goebel 9 months ago

Fixes #22083 - replace deprecated am dirty methods

History

#1 Updated by Timo Goebel over 1 year ago

  • Related to Refactor #21959: Remove positional arguments for Rails 5.1 compatibility added

#2 Updated by Michael Moll over 1 year ago

#3 Updated by Michael Moll over 1 year ago

  • Related to deleted (Refactor #21959: Remove positional arguments for Rails 5.1 compatibility)

#4 Updated by Michael Moll over 1 year ago

#5 Updated by Michael Moll over 1 year ago

Personally I'd wait for Rails 5.2 support in core to really know, where changes are needed.

#6 Updated by Michael Moll over 1 year ago

  • Assignee set to Michael Moll
  • Status changed from New to Ready For Testing

_discovery has an empty config/as_deprecation_whitelist.yaml in it's repo, now I'm also running into this...

#7 Updated by The Foreman Bot over 1 year ago

  • Pull request https://github.com/theforeman/foreman_discovery/pull/400 added

#8 Updated by Timo Goebel over 1 year ago

  • Pull request https://github.com/theforeman/foreman_discovery/pull/399 added

#9 Updated by Michael Moll over 1 year ago

  • Assignee changed from Michael Moll to Timo Goebel
  • Pull request deleted (https://github.com/theforeman/foreman_discovery/pull/400)

#10 Updated by The Foreman Bot over 1 year ago

  • Pull request https://github.com/theforeman/foreman_discovery/pull/401 added

#11 Updated by Timo Goebel 9 months ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF