method

deprecated_property_setter

Importance_0
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Class: ClassMethods

Method deprecated or moved

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

deprecated_property_setter(property, value, block) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/model_schema.rb, line 337
      def deprecated_property_setter(property, value, block)
        if block
          ActiveSupport::Deprecation.warn(
            "Calling set_#{property} is deprecated. If you need to lazily evaluate "              "the #{property}, define your own `self.#{property}` class method. You can use `super` "              "to get the default #{property} where you would have called `original_#{property}`."
          )

          define_attr_method property, value, false, &block
        else
          ActiveSupport::Deprecation.warn(
            "Calling set_#{property} is deprecated. Please use `self.#{property} = 'the_name'` instead."
          )

          define_attr_method property, value, false
        end
      end
Register or log in to add new notes.