Class: Stagehand::Database::StagingProbe

Inherits:
Probe
  • Object
show all
Defined in:
lib/stagehand/database.rb

Class Method Summary collapse

Methods inherited from Probe

name

Class Method Details

.connectionObject



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_connectionObject



139
140
141
# File 'lib/stagehand/database.rb', line 139

def self.init_connection
  super(Configuration.staging_connection_name)
end