Better error handling

https://github.com/werein/x-editable-rails/issues/16
Example with error handling