module Neo4j::Rails::Timestamps::ClassMethods

Public Instance Methods

define_timestamp_method(method_name, property) click to toggle source
# File lib/neo4j/rails/timestamps.rb, line 62
                                def define_timestamp_method(method_name, property)
                                        class_eval "                                                def #{method_name}
                                                        write_date_or_timestamp(:#{property}) if Neo4j::Config[:timestamps]
                                                end
", __FILE__, __LINE__
                          end
property_setup(property, options) click to toggle source
# File lib/neo4j/rails/timestamps.rb, line 52
                      def property_setup(property, options)
                              super
define_timestamp_method(:create_timestamp,:created_at) if property == :created_at
                        define_timestamp_method(:update_timestamp,:updated_at) if property == :updated_at
                              # ensure there's always a type on the timestamp properties
                              if Neo4j::Config[:timestamps] && TIMESTAMP_PROPERTIES.include?(property)
                                      _decl_props[property][:type] ||= Time
                              end
                      end