method

to_h

to_h()
public

No documentation available.

# File activemodel/lib/active_model/errors.rb, line 326
    def to_h
      ActiveSupport::Deprecation.warn(<<~EOM)
        ActiveModel::Errors#to_h is deprecated and will be removed in Rails 6.2.
        Please use `ActiveModel::Errors.to_hash` instead. The values in the hash
        returned by `ActiveModel::Errors.to_hash` is an array of error messages.
      EOM

      to_hash.transform_values { |values| values.last }
    end