method

attribute_will_change!

rails latest stable - Class: ActiveRecord::AttributeMethods::Dirty

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v5.1.7) is shown here.

attribute_will_change!(attr_name)
private

No documentation available.

# File activerecord/lib/active_record/attribute_methods/dirty.rb, line 277
        def attribute_will_change!(attr_name)
          super
          if self.class.has_attribute?(attr_name)
            mutations_from_database.force_change(attr_name)
          else
            ActiveSupport::Deprecation.warn(              #{attr_name} is not an attribute known to Active Record.              This behavior is deprecated and will be removed in the next              version of Rails. If you'd like #{attr_name} to be managed              by Active Record, add `attribute :#{attr_name} to your class..squish)
            mutations_from_database.deprecated_force_change(attr_name)
          end
        end