to_a() public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activemodel/lib/active_model/errors.rb, line 57
    def to_a
      inject([]) do |errors_with_attributes, (attribute, errors)|
        if error.blank?
          errors_with_attributes
        else
          if attr == :base
            errors_with_attributes << error
          else
            errors_with_attributes << (attribute.to_s.humanize + " " + error)
          end
        end
      end
    end
Register or log in to add new notes.