instance method prepare_content

Ruby on Rails 6.1.7.10

Since v6.1.7.10 Last seen in v6.1.7.10 Private

Signature

prepare_content()

No documentation comment.

Source
# 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

Defined in activemodel/lib/active_model/errors.rb line 623 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveModel::DeprecationHandlingMessageHash

Type at least 2 characters to search.

↑↓ navigate · open · esc close