Skip to content

Commit

Permalink
use JSON.generate in ruby
Browse files Browse the repository at this point in the history
  • Loading branch information
zpao committed Feb 6, 2015
1 parent be57a92 commit 5848e37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

# always return json
res['Content-Type'] = 'application/json'
res.body = comments.to_json
res.body = JSON.generate(comments)
end

trap 'INT' do server.shutdown end
Expand Down

0 comments on commit 5848e37

Please sign in to comment.