Skip to content

Commit bf0a360

Browse files
committed
Merge pull request #2 from unitymind/master
Simple one-liner
2 parents 55370ea + 30f7cc3 commit bf0a360

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/grape/roar/formatter.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ module Formatter
33
module Roar
44
class << self
55
def call(object, env)
6-
return object.to_json(env: env) if object.respond_to?(:to_json)
7-
MultiJson.dump(object)
6+
object.respond_to?(:to_json) ? object.to_json(env: env) : MultiJson.dump(object)
87
end
98
end
109
end

0 commit comments

Comments
 (0)