Module: Rails::Mongomatic::Support::Errors

Defined in:
lib/rails/mongomatic/support.rb

Instance Method Summary collapse

Instance Method Details

#any?Boolean

Returns:

  • (Boolean)


38
39
40
# File 'lib/rails/mongomatic/support.rb', line 38

def any?
  !empty?
end

#countObject



42
43
44
# File 'lib/rails/mongomatic/support.rb', line 42

def count
  @errors.values.inject(0) { |sum, errors| sum += errors.size }
end