Class: Stagehand::Database::StagingProbe
- Defined in:
- lib/stagehand/database.rb
Class Method Summary collapse
Methods inherited from Probe
Class Method Details
.connection ⇒ Object
143 144 145 146 147 148 149 |
# File 'lib/stagehand/database.rb', line 143 def self.connection if Stagehand::Database.connected_to_staging? ActiveRecord::Base.connection # Reuse existing connection so we stay within the current transaction else super end end |
.init_connection ⇒ Object
139 140 141 |
# File 'lib/stagehand/database.rb', line 139 def self.init_connection super(Configuration.staging_connection_name) end |