Sha256: 9cd3ba3666bd18c461b7376df9feac35a4f330103024ddfb55b1ad14ed5b3957
Contents?: true
Size: 373 Bytes
Versions: 34
Compression:
Stored size: 373 Bytes
Contents
require 'multi_json' module Fanforce::Plugin::Sinatra::JSONHelpers def json(*args) args[0] = {} if args.size == 0 content_type (Rack.const_defined?('JSONR') and Rack::JSONR.is_jsonp_request?(request)) ? 'application/javascript' : :json MultiJson.dump args[0], :pretty => settings.respond_to?(:json_pretty) && settings.json_pretty end alias JSON json end
Version data entries
34 entries across 34 versions & 1 rubygems