Module: CouchRest::Model::Validations
- Extended by:
- ActiveSupport::Concern
- Includes:
- ActiveModel::Validations
- Included in:
- Base
- Defined in:
- lib/couchrest/model/validations.rb,
lib/couchrest/model/validations/uniqueness.rb,
lib/couchrest/model/validations/casted_model.rb
Overview
Validations may be applied to both Model::Base and Model::CastedModel
Defined Under Namespace
Modules: ClassMethods Classes: CastedModelValidator, UniquenessValidator
Instance Method Summary collapse
-
#valid?(context = nil) ⇒ true, false
Determine if the document is valid.
Instance Method Details
#valid?(context = nil) ⇒ true, false
Determine if the document is valid.
30 31 32 |
# File 'lib/couchrest/model/validations.rb', line 30 def valid?(context = nil) super context ? context : (new? ? :create : :update) end |