ClassMethods¶
Constants¶
Methods¶
#creates_unique
def creates_unique @creates_unique = true end
#creates_unique?
def creates_unique? !!@creates_unique end
#creates_unique_rel
def creates_unique_rel warning = <<-WARNING creates_unique_rel() is deprecated and will be removed from future releases, use creates_unique() instead. WARNING ActiveSupport::Deprecation.warn(warning, caller) creates_unique end
#end_class
alias_method :end_class, :to_class
- #extract_association_attributes!
Extracts keys from attributes hash which are relationships of the model TODO: Validate separately that relationships are getting the right values? Perhaps also store the values and persist relationships on save?
def extract_association_attributes!(attributes) return if attributes.blank? {}.tap do |relationship_props| attributes.each_key do |key| relationship_props[key] = attributes.delete(key) if [:from_node, :to_node].include?(key) end end end
#id_property_name
def id_property_name false end
#load_entity
def load_entity(id) Neo4j::Node.load(id) end
#start_class
alias_method :start_class, :from_class
#unique?
def creates_unique? !!@creates_unique end