Module: MongoModel::Validations
- Extended by:
- ActiveSupport::Concern
- Includes:
- ActiveModel::Validations
- Included in:
- EmbeddedDocument
- Defined in:
- lib/mongomodel/concerns/validations.rb,
lib/mongomodel/concerns/validations/associated.rb
Defined Under Namespace
Modules: ClassMethods Classes: AssociatedValidator
Instance Method Summary collapse
Instance Method Details
#valid?(context = nil) ⇒ Boolean
21 22 23 24 |
# File 'lib/mongomodel/concerns/validations.rb', line 21 def valid?(context=nil) context ||= new_record? ? :create : :update super end |