Class: RailsDbBrowser::ConnectionKeeper
- Inherits:
-
Object
- Object
- RailsDbBrowser::ConnectionKeeper
- Defined in:
- lib/rails_db_browser/connection_keeper.rb
Overview
Abstract class holding connection staff
Defined Under Namespace
Classes: Column, Connection, FakeModel, Result
Instance Method Summary collapse
- #connection(name = nil) ⇒ Object
-
#connection_names ⇒ Object
get connection names.
Instance Method Details
#connection(name = nil) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/rails_db_browser/connection_keeper.rb', line 9 def connection(name=nil) = unless name.present? ActiveRecord::Base.connection else FakeModel.get_connection(name) end Connection.new() end |
#connection_names ⇒ Object
get connection names
5 6 7 |
# File 'lib/rails_db_browser/connection_keeper.rb', line 5 def connection_names ActiveRecord::Base.configurations.keys end |