Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

Blake Williams's Profile

GitHub User: BlakeWilliams

Site: http://blakewilliams.me

Comments by Blake Williams

Avatar

Ember Data expects the server to respond JSON with errors as the root key, then the attribute name with the errors nested inside of that. You can basically do the following in Rails and Ember will accept it.

ruby
      render json: {errors: @project.errors.messages}, status: :unprocessable_entity

This will set 'isError' on that model and will remain at isError (and refuse to commit) until the attributes that the server said had errors are changed.

Avatar

Awesome screencast. I love the from scratch episodes and I also enjoyed the inclusion of Test::Unit.