Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed issue where it was impossible to turn off JSON callback wrapping

  • Loading branch information...
commit eed96850de2cbcef27d0232a9df877fe581b6312 1 parent 93c314c
@tanelj tanelj authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/json_builder/compiler.rb
View
4 lib/json_builder/compiler.rb
@@ -45,8 +45,8 @@ def generate(*args, &block)
def initialize(options={})
@_members = []
@_scope = options[:scope]
- @_callback = options[:callback] || true
- @_pretty_print = options[:pretty] || false
+ @_callback = options.has_key?(:callback) ? options[:callback] : true
+ @_pretty_print = options.has_key?(:pretty) ? options[:pretty] : false
# Only copy instance variables if there is a scope and presence of Rails
copy_instance_variables_from(@_scope) if @_scope
Please sign in to comment.
Something went wrong with that request. Please try again.