Class: PandaPal::ApplicationController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/panda_pal/application_controller.rb

Instance Method Summary collapse

Instance Method Details

#share_controller_on_threadObject



5
6
7
8
9
10
# File 'app/controllers/panda_pal/application_controller.rb', line 5

def share_controller_on_thread
  Thread.current[:controller] = self
  yield
ensure
  Thread.current[:controller] = nil
end