We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3f4d521 commit e8783a9Copy full SHA for e8783a9
lib/gon/watch.rb
@@ -109,7 +109,7 @@ def return_variable?(variable)
109
def return_variable(value)
110
controller = Gon::Base.get_controller
111
112
- controller.render :text => value.to_json
+ controller.render :json => value
113
end
114
115
spec/gon/watch_spec.rb
@@ -54,7 +54,7 @@
54
controller.params = params
55
Gon::Request.env['action_controller.instance'] = controller
56
57
- controller.should_receive('render').with(:text => '1')
+ controller.should_receive('render').with(:json => 1)
58
59
Gon.watch.a = 1
60
0 commit comments