Sha256: 78ba419938a497f4b48c851370118a431106519d5c4a713ec95d1c01c7857667
Contents?: true
Size: 778 Bytes
Versions: 8
Compression:
Stored size: 778 Bytes
Contents
module Neo4j module Shared extend ActiveSupport::Concern extend ActiveModel::Naming include ActiveModel::Conversion include ActiveModel::Serializers::Xml include ActiveModel::Serializers::JSON module ClassMethods def neo4j_session_name (name) @neo4j_session_name = name end def neo4j_session if @neo4j_session_name Neo4j::Session.named(@neo4j_session_name) || raise("#{self.name} is configured to use a neo4j session named #{@neo4j_session_name}, but no such session is registered with Neo4j::Session") else Neo4j::Session.current! end end end included do self.include_root_in_json = true def self.i18n_scope :neo4j end end end end
Version data entries
8 entries across 8 versions & 1 rubygems