Module: Gon::ControllerHelpers

Defined in:
lib/gon/helpers.rb,
lib/gon/compatibility/old_rails.rb

Instance Method Summary collapse

Instance Method Details

#gonObject



30
31
32
33
34
35
36
37
# File 'lib/gon/helpers.rb', line 30

def gon
  if wrong_gon_request?
    gon_request = Request.new(request.env)
    gon_request.id = gon_request_uuid
    RequestStore.store[:gon] = gon_request
  end
  Gon
end