Sha256: d012457c577fe6903b6875680aa05e7c51ab11606e80379fe262305619454371

Contents?: true

Size: 987 Bytes

Versions: 25

Compression:

Stored size: 987 Bytes

Contents

module Neo4j
  # Makes Neo4j Relationships more or less act like ActiveRecord objects.
  # See documentation at https://github.com/neo4jrb/neo4j/wiki/Neo4j%3A%3AActiveRel
  module ActiveRel
    extend ActiveSupport::Concern

    include Neo4j::Shared
    include Neo4j::ActiveRel::Initialize
    include Neo4j::Shared::Identity
    include Neo4j::Shared::SerializedProperties
    include Neo4j::ActiveRel::Property
    include Neo4j::ActiveRel::Persistence
    include Neo4j::ActiveRel::Validations
    include Neo4j::ActiveRel::Callbacks
    include Neo4j::ActiveRel::Query
    include Neo4j::ActiveRel::Types

    class FrozenRelError < StandardError; end

    def initialize(*args)
      load_nodes
      super
    end

    def neo4j_obj
      _persisted_obj || fail('Tried to access native neo4j object on a non persisted object')
    end

    included do
      def self.inherited(other)
        super
      end
    end

    ActiveSupport.run_load_hooks(:active_rel, self)
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
neo4j-5.0.15 lib/neo4j/active_rel.rb
neo4j-5.0.14 lib/neo4j/active_rel.rb
neo4j-5.0.13 lib/neo4j/active_rel.rb
neo4j-5.0.12 lib/neo4j/active_rel.rb
neo4j-5.0.11 lib/neo4j/active_rel.rb
neo4j-5.0.10 lib/neo4j/active_rel.rb
neo4j-5.0.9 lib/neo4j/active_rel.rb
neo4j-5.0.8 lib/neo4j/active_rel.rb
neo4j-5.0.7 lib/neo4j/active_rel.rb
neo4j-5.0.6 lib/neo4j/active_rel.rb
neo4j-5.0.5 lib/neo4j/active_rel.rb
neo4j-5.0.4 lib/neo4j/active_rel.rb
neo4j-5.0.3 lib/neo4j/active_rel.rb
neo4j-5.0.2 lib/neo4j/active_rel.rb
neo4j-5.0.1 lib/neo4j/active_rel.rb
neo4j-5.0.0 lib/neo4j/active_rel.rb
neo4j-5.0.0.rc.3 lib/neo4j/active_rel.rb
neo4j-5.0.0.rc.2 lib/neo4j/active_rel.rb
neo4j-5.0.0.rc.1 lib/neo4j/active_rel.rb
neo4j-4.1.5 lib/neo4j/active_rel.rb