module Neo4j::ActiveNode::Validations

This mixin replace the original save method and performs validation before the save.

Public Instance Methods

valid?(context = nil) click to toggle source

@return [Boolean] true if valid

Calls superclass method Neo4j::Shared::Validations#valid?
   # File lib/neo4j/active_node/validations.rb
10 def valid?(context = nil)
11   context ||= (new_record? ? :create : :update)
12   super(context)
13   errors.empty?
14 end