lib/neo4j/rails/model.rb in neo4j-1.0.0.beta.18 vs lib/neo4j/rails/model.rb in neo4j-1.0.0.beta.19
- old
+ new
@@ -179,17 +179,19 @@
if valid?(:create)
node = Neo4j::Node.new(props)
return false unless _java_node.save_nested(node)
init_on_load(node)
init_on_create
+ self.created_at = DateTime.now if Neo4j::Config[:timestamps] && respond_to?(:created_at)
clear_changes
true
end
end
else
_run_update_callbacks do
if valid?(:update)
clear_changes
+ self.updated_at = DateTime.now if Neo4j::Config[:timestamps] && respond_to?(:updated_at)
true
end
end
end
end