Skip to content

Commit

Permalink
Revert "Pretty-print JSON in development and testing"
Browse files Browse the repository at this point in the history
This reverts commit 8492f0e.
  • Loading branch information
squadette committed Mar 16, 2017
1 parent 12f88a5 commit 807e140
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/helpers/react_on_rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,10 @@ def server_render_js(js_expression, options = {})
private

def json_safe_and_pretty(something)
if Rails.env.production?
ERB::Util.json_escape(something.to_json)
else
if Rails.env.development?
ERB::Util.json_escape(JSON.pretty_generate(something.as_json))
else
ERB::Util.json_escape(something.to_json)
end
end

Expand Down

0 comments on commit 807e140

Please sign in to comment.