Skip to content

Commit 8282ada

Browse files
committed
Fixed persistance for requests without gon variables assignment
1 parent 24ea60a commit 8282ada

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/gon/helpers.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ def self.included base
77

88
module InstanceMethods
99
def include_gon(options = {})
10-
if Gon.request_env && Gon.all_variables.present?
10+
if Gon.request_env && Gon.all_variables.present? && Gon.request == request.object_id
1111
data = Gon.all_variables
1212
namespace = options[:namespace] || 'gon'
1313
script = '<script>window.' + namespace + ' = {};'

0 commit comments

Comments
 (0)