Module: Gon::SpecHelper::Rails::ClassMethods::GonSession

Defined in:
lib/gon/spec_helpers.rb

Instance Method Summary collapse

Instance Method Details

#processObject



8
9
10
11
12
13
14
15
16
# File 'lib/gon/spec_helpers.rb', line 8

def process(*, **)
  # preload threadlocal & store controller instance
  if controller.is_a? ActionController::Base
    controller.gon
    Gon.send(:current_gon).env[Gon::EnvFinder::ENV_CONTROLLER_KEY] =
     controller
  end
  super
end