method

deprecated_property_setter

deprecated_property_setter(property, value, block)
private

No documentation available.

# 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