instance method size

Ruby on Rails 2.2.3

Last seen in v2.3.18

Available in: v2.2.3 v2.3.18

Signature

size()

Returns the total number of errors added. Two errors added to the same attribute will be counted as such.

Source
# File activerecord/lib/active_record/validations.rb, line 226
    def size
      @errors.values.inject(0) { |error_count, attribute| error_count + attribute.size }
    end

Defined in activerecord/lib/active_record/validations.rb line 226 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::Errors

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close