This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
instance.version(version_number) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class OrdersController < ApplicationController | |
before_filter :authenticate_user!, :ensure_tenant_setup! | |
protected | |
def ensure_tenant_setup! | |
Neo4j.threadlocal_ref_node = current_user.tenant | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Tenant < Neo4j::Rails::Model | |
property :name | |
ref_node { Neo4j.default_ref_node } | |
after_create :create_default_data | |
def create_default_data | |
Neo4j.threadlocal_ref_node = self | |
load("#{Rails.root}/db/tenant_default_data.rb") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Country < Neo4j::Rails::Model | |
property :name | |
ref_node { Neo4j.default_ref_node } | |
end |
NewerOlder