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.
2 parents 55370ea + 30f7cc3 commit bf0a360Copy full SHA for bf0a360
lib/grape/roar/formatter.rb
@@ -3,8 +3,7 @@ module Formatter
3
module Roar
4
class << self
5
def call(object, env)
6
- return object.to_json(env: env) if object.respond_to?(:to_json)
7
- MultiJson.dump(object)
+ object.respond_to?(:to_json) ? object.to_json(env: env) : MultiJson.dump(object)
8
end
9
10
0 commit comments