andreasronge/neo4j — pull request #361 by subvertallchris (2014-06-25 02:30:05+00:00)
Title: magic property makeover

-Moved the addition of the `DateTime` type for `created_at` and `updated_at` to a `magic_properties` method.

-Added support for the `Time` property type, which is supported by ActiveRecord and was supported by Neo4j.rb 2.3 but is not supported by ActiveAttr. It's converted to DateTime behind the scenes but it should make migration and adoption easier. If we want to be really nice, we could convert these back to `Time` objects, I guess?

-Fixed the `updated_at` property so it is set to the same as `created_at` when the object is first created. This is consistent with ActiveRecord's behavior.

-Specs for this stuff. I changed some examples to use the `property` method instead of `attribute.` `attribute :property` works but it bypasses the magic properties, which screws up type conversion and didn't make sense for the purpose of the spec I added. If this was by design, my apologies!