Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- elsif options.include?(:json)
- json = options[:json]
- json = ActiveSupport::JSON.encode(json) unless json.is_a?(String)
- json = "#{options[:callback]}(#{json})" unless options[:callback].blank?
- response.content_type ||= Mime::JSON
- render_for_text(json, options[:status])
Add Comment
Please, Sign In to add comment