lib/neo4j/shared/validations.rb in neo4j-4.0.0 vs lib/neo4j/shared/validations.rb in neo4j-4.1.0
- old
+ new
@@ -12,11 +12,11 @@
# The validation process on save can be skipped by passing false. The regular Model#save method is
# replaced with this when the validations module is mixed in, which it is by default.
# @param [Hash] options the options to create a message with.
# @option options [true, false] :validate if false no validation will take place
# @return [Boolean] true if it saved it successfully
- def save(options={})
+ def save(options = {})
result = perform_validations(options) ? super : false
if !result
Neo4j::Transaction.current.failure if Neo4j::Transaction.current
end
result
@@ -29,11 +29,11 @@
errors.empty?
end
private
- def perform_validations(options={})
+ def perform_validations(options = {})
perform_validation = case options
when Hash
options[:validate] != false
end
@@ -43,6 +43,6 @@
true
end
end
end
end
-end
\ No newline at end of file
+end