Class: Rails::DBConsole

Inherits:
Object
  • Object
show all
Includes:
TrilogyAdapter::Rails::DBConsole
Defined in:
lib/trilogy_adapter/rails/dbconsole.rb

Instance Method Summary collapse

Methods included from TrilogyAdapter::Rails::DBConsole

#db_config

Instance Method Details

#_brick_startObject



27
# File 'lib/trilogy_adapter/rails/dbconsole.rb', line 27

alias _brick_start start

#startObject



28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/trilogy_adapter/rails/dbconsole.rb', line 28

def start
  ENV["RAILS_ENV"] ||= @options[:environment] || environment

  if config["adapter"] == "trilogy"
    begin
      ::ActiveRecord::ConnectionAdapters::TrilogyAdapter.dbconsole(config, @options)
    rescue NotImplementedError
      abort "Unknown command-line client for #{db_config.database}."
    end
  else
    _brick_start
  end
end