method

encode

rails latest stable - Class: ActiveRecord::AttributeSet::YAMLEncoder

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(attribute_set, coder)
public

No documentation available.

# File activerecord/lib/active_record/attribute_set/yaml_encoder.rb, line 10
      def encode(attribute_set, coder)
        coder["concise_attributes"] = attribute_set.each_value.map do |attr|
          if attr.type.equal?(default_types[attr.name])
            attr.with_type(nil)
          else
            attr
          end
        end
      end