Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

play nice with modifying global request environment and respect conve…

…ntions
  • Loading branch information...
commit fa5ca1aaebd1ba7397660e3e211b3794bd891180 1 parent 65277b4
@larskluge larskluge authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 lib/gon.rb
View
10 lib/gon.rb
@@ -15,7 +15,7 @@ module Gon
class << self
def all_variables
- @request_env[:gon]
+ @request_env['gon']
end
def all_variables=(values)
@@ -23,12 +23,12 @@ def all_variables=(values)
end
def clear
- @request_env[:gon] = {}
+ @request_env['gon'] = {}
end
def request_env=(environment)
@request_env = environment
- @request_env[:gon] ||= {}
+ @request_env['gon'] ||= {}
end
def request_env
@@ -57,11 +57,11 @@ def method_missing(m, *args, &block)
end
def get_variable(name)
- @request_env[:gon][name]
+ @request_env['gon'][name]
end
def set_variable(name, value)
- @request_env[:gon][name] = value
+ @request_env['gon'][name] = value
end
# TODO: Remove required argument view_path, and by default use current action
Please sign in to comment.
Something went wrong with that request. Please try again.