Module: N4j::Node::AutoRelate

Extended by:
ActiveSupport::Concern
Defined in:
lib/n4j/auto_relate.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#relate_to_rootObject



36
37
38
39
40
# File 'lib/n4j/auto_relate.rb', line 36

def relate_to_root
  unless persisted?
    new_relationships << GenericRelationship.new(:start => self.class.model_root, :end => self, :type => 'is_a')
  end
end