Module: Ilog::Controllers::Helpers

Included in:
Asset::Display, Digital::Show, Index::Digital, Index::Index
Defined in:
lib/ilog/controllers/helpers.rb

Instance Method Summary collapse

Instance Method Details

#get_database(path) ⇒ Object



9
10
11
# File 'lib/ilog/controllers/helpers.rb', line 9

def get_database path
    Ilog.configuration.namespaces[get_namespace path]
end

#get_namespace(path) ⇒ Object



12
13
14
# File 'lib/ilog/controllers/helpers.rb', line 12

def get_namespace path
    path
end

#set_database(path) ⇒ Object



4
5
6
7
8
# File 'lib/ilog/controllers/helpers.rb', line 4

def set_database path
	tmp_config = ActiveRecord::Base.connection_config
	tmp_config[:database] = get_database path
	ActiveRecord::Base.establish_connection tmp_config
end