Sha256: be5d08d24e9ce757db781976c81aca768c63cfff65d793ca0db12103ebbd934f

Contents?: true

Size: 364 Bytes

Versions: 1

Compression:

Stored size: 364 Bytes

Contents

require 'rails'
require 'rails_sandbox_server/engine'

class ActionController::Base
  before_action :sandbox_begin_transaction

  def sandbox_begin_transaction
    unless ActiveRecord::Base.connection.transaction_open?
      ActiveRecord::Base.connection.begin_db_transaction
    end
  end
end

module RailsSandboxServer
  class Railtie < Rails::Railtie
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rails_sandbox_server-0.0.3 lib/rails_sandbox_server.rb