size() public

Returns the number of error messages.

  p.errors.add(:name, "can't be blank")
  p.errors.size # => 1
  p.errors.add(:name, "must be specified")
  p.errors.size # => 2
Show source
Register or log in to add new notes.