░▒▓████████████████████████████████▓▒░ ░▒▓█ ▓▒░ ░▒▓█ ~ S W A M P ~ ▓▒░ ░▒▓█ ▓▒░ ░▒▓████████████████████████████████▓▒░
pplmvsvm
LOCATION:
/var/www/canvas/vendor/bundle/ruby/3.1.0/gems/guardrail-3.0.2/lib
☗ ROOT
↻ REFRESH
✎ CARVE FLESH
EDITING: guard_rail.rb
# frozen_string_literal: true module GuardRail class << self def environment ActiveRecord::Base.current_role end def activate(role) return yield if environment == role ActiveRecord::Base.connected_to(role: role) { yield } end def activate!(role) return if environment == role # Don't reset the shard when changing the role ActiveRecord::Base.connecting_to(role: role, shard: nil) end end end
CANCEL
Name
Type
Size
Modified
Actions
↩ ..
DIR
—
—
📁 guard_rail/
DIR
—
2023-09-24 03:48
📄 guard_rail.rb
RB
459 B
2023-09-24 03:48
EDIT
📄 guardrail.rb
RB
52 B
2023-09-24 03:48
EDIT