Edit in JSFiddle

window.App = Em.Application.create()

App.ApplicationAdapter = DS.ActiveModelAdapter.extend()

App.ApplicationRoute = Em.Route.extend
  model: ->
    @store.createRecord 'user'

    updateUser: ->
      @currentModel.save().then ->
        alert 'User created'
      , ->
        # You have to pass an error handler to the save promise,
        # even if it does nothing, otherwise an exception will
        # be thrown and the errors won't be populated for you

App.User = DS.Model.extend
  name:   DS.attr 'string'
  email:  DS.attr 'string'

  url: "/users"
  type: 'POST'
  status: 422
      name:   ["must be present"]
      email:  ["is not an email", "is blank"]
      base:   ["This person is a generally unsavoury character and is not allowed to sign up"]

Ember.Handlebars.helper 'titleize', (text) ->

String::titleize = ->
  @underscore().replace(/_/g, " ").capitalize()

App.ErrorMessagesComponent = Em.Component.extend
  errors: Em.computed.alias 'for.errors.content'
# For a detailed rundown of the object form components below, see:
# http://alexspeller.com/simple-forms-with-ember/

App.ObjectFormComponent = Em.Component.extend
  buttonLabel: "Submit"

    submit: ->

App.FormFieldComponent = Em.Component.extend
  type: Em.computed 'for', ->
    if @get('for').match(/password/)

  label: Em.computed 'for', ->
    @get('for').underscore().replace(/_/g, " ").capitalize()

  fieldId: Em.computed 'object', 'for', ->
    "#{Em.guidFor @get('object')}-input-#{@get('for')}"

  object: Em.computed.alias 'parentView.for'

  hasError: (->
    @get('object.errors')?.has @get('for')
  ).property 'object.errors.[]'

  errors: (->
    return Em.A() unless @get('object.errors')
    @get('object.errors').errorsFor(@get('for')).mapBy('message').join(', ')
  ).property 'object.errors.[]'

  setupBindings: (->
    @binding?.disconnect @ # Disconnect old binding if present

    # Create a binding between the value property of the component,
    # and the correct field name on the model object.
    @binding = Em.Binding.from("object.#{@get 'for'}").to('value')

    # Activate the binding
    @binding.connect @

  ).on('init').observes 'for', 'object'

  # Ensure the bindings are cleaned up when the component is removed
  tearDownBindings: (->
    @binding?.disconnect @
  ).on 'willDestroyElement'
<script type="text/x-handlebars">
  <div class="container">
    <h2>Create User</h2>

    {{error-messages for=this}}

    {{#object-form for=this action="updateUser" buttonLabel="Save"}}
      {{form-field for="name"}}
      {{form-field for="email"}}


<script type="text/x-handlebars" data-template-name="components/error-messages">
  {{#if errors.length}}
    <div class="alert alert-danger">
      <h4>There was a problem</h4>
        {{#each errors}}
            {{titleize attribute}} {{message}}

<script type="text/x-handlebars" data-template-name="components/form-field">
  <div class="form-group" {{bind-attr class="hasError:has-error"}}>
    <label {{bind-attr for=label}}>{{label}}</label>
    {{#if template}}
      {{input type=type value=value id=label class="form-control"}}
  {{#if errors.length}}
    <span class="help-block">


<script type="text/x-handlebars" data-template-name="components/object-form">
  <form {{action "submit" on="submit"}}>


    <div class="form-group">
      <button type='submit' class='btn btn-block btn-primary'>{{buttonLabel}}</button>