Skip to content

Instantly share code, notes, and snippets.

@MaryKuz
Created March 28, 2019 09:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MaryKuz/3dace8fe39f16c4c364eaa1b72e4ac2f to your computer and use it in GitHub Desktop.
Save MaryKuz/3dace8fe39f16c4c364eaa1b72e4ac2f to your computer and use it in GitHub Desktop.
Create views/application/exception.json.erb and write code there
<%= sanitize({ errors: { @exception.class.name => [@exception.to_s] } }.to_json) %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment