Module: Her::Model::ORM::ErrorMethods

Extended by:
ActiveSupport::Concern
Included in:
Her::Model::ORM
Defined in:
lib/her/model/orm/error_methods.rb

Instance Method Summary collapse

Instance Method Details

#invalid?Boolean

Return ‘true` if a resource contains errors

Returns:

  • (Boolean)


13
14
15
# File 'lib/her/model/orm/error_methods.rb', line 13

def invalid?
  errors.any?
end

#valid?Boolean

Return ‘true` if a resource does not contain errors

Returns:

  • (Boolean)


8
9
10
# File 'lib/her/model/orm/error_methods.rb', line 8

def valid?
  errors.empty?
end