module ActiveGraph::Node::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
ActiveGraph::Shared::Validations#valid?
# File lib/active_graph/node/validations.rb 10 def valid?(context = nil) 11 context ||= (new_record? ? :create : :update) 12 super(context) 13 errors.empty? 14 end