http://travisjeffery.com/b/2012/04/rendering-errors-in-json-with-rails/