title: How to make Ember controller handle server validation errors?
body: <p>I use RESTAdapter with Ember Data. How to make Ember controller handle server validation errors? I think this code should be in the line "console.log(todo.errors);" but I have no idea how to achieve rendaring needed template...</p>
  
  <pre><code>App.TodosRoute = App.AuthenticatedRoute.extend({
    model: function () {
      return App.Todo.find();
    }
  });
  
  App.TodosController = Ember.ArrayController.extend({
    createTodo: function(todo) {
      var data = this.getProperties('title', 'priority', 'due_date');
      var todo = App.Todo.createRecord(data);
  
      var self = this;
  
      todo.on('becameInvalid', function(todo) {
        // show errors on the form. code goes here
        console.log(todo.errors);
      });
  
      todo.on('didCreate', function() {
        // render list. code goes here
        self.set('title', '');
        self.set('priority', '');
        self.set('due_date', '');
      });
      todo.save();
    }
  });
  
  &lt;script type="text/x-handlebars" data-template-name='todo/_edit'&gt;
    {{input type='number' class="input" placeholder="Priority" value=priority}}
    {{input class="input" placeholder="What needs to be done?" value=title}}
    {{input type='date' class="input" placeholder="Due date" value=due_date}}
  &lt;/script&gt;
  
  &lt;script type="text/x-handlebars" data-template-name="todos"&gt;
    &lt;section id="todoapp"&gt;
      &lt;header id="header"&gt;
        {{partial 'todo/edit'}}
        &lt;button {{action "createTodo"}}&gt;Save&lt;/button&gt;
      &lt;/header&gt;
  
        &lt;section id="main"&gt;
          &lt;ul id="todo-list" class="sortable"&gt;
            {{#each controller itemController='todo'}}
              {{#unless isNew}}
                &lt;li {{bindAttr class="isEditing:editing"}} data-id="{{unbound id}}"&gt;
                  {{#if isEditing}}
                    {{partial 'todo/edit'}}
                    &lt;button {{action "saveTodo"}} class="save-button"&gt;Save&lt;/button&gt;
                  {{else}}
                    &lt;label&gt;{{priority}}&lt;/label&gt;
                    &lt;label&gt;{{title}}&lt;/label&gt;
                    &lt;label&gt;{{date due_date}}&lt;/label&gt;
                    &lt;button {{action "editTodo"}} class="edit-button"&gt;Edit&lt;/button&gt;
                    &lt;button {{action "removeTodo"}} class="destroy"&gt;Delete&lt;/button&gt;
                  {{/if}}
                &lt;/li&gt;
              {{/unless}}
            {{/each}}
          &lt;/ul&gt;
        &lt;/section&gt;
    &lt;/section&gt;
  &lt;/script&gt;
  </code></pre>