method

encode_with

rails latest stable - Class: ActiveRecord::Attribute

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.

encode_with(coder)
public

No documentation available.

# File activerecord/lib/active_record/attribute.rb, line 123
    def encode_with(coder)
      coder["name"] = name
      coder["value_before_type_cast"] = value_before_type_cast unless value_before_type_cast.nil?
      coder["type"] = type if type
      coder["original_attribute"] = original_attribute if original_attribute
      coder["value"] = value if defined?(@value)
    end