method

prepare_content

rails latest stable - Class: ActiveModel::DeprecationHandlingMessageHash

Method deprecated or moved

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

prepare_content()
private

No documentation available.

# File activemodel/lib/active_model/errors.rb, line 623
      def prepare_content
        content = @errors.to_hash
        content.each do |attribute, value|
          content[attribute] = DeprecationHandlingMessageArray.new(value, @errors, attribute)
        end
        content.default_proc = proc do |hash, attribute|
          hash = hash.dup
          hash[attribute] = DeprecationHandlingMessageArray.new([], @errors, attribute)
          __setobj__ hash.freeze
          hash[attribute]
        end
        content.freeze
      end