Ember 0.9.8.1 Template with ember-data

by kristaps_petersons

HTML

<script src="https://github.com/downloads/emberjs/ember.js/ember-0.9.8.1.js"></script>
<script src="https://github.com/downloads/pjmorse/ember-skeleton/ember-data.min.js"></script>
<script src="https://raw.github.com/eternicode/bootstrap-datepicker/master/js/bootstrap-datepicker.js"></script>
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.0.4/css/bootstrap.min.css">
<script src="http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.0.4/img/glyphicons-halflings.png"></script>
<script src="https://raw.github.com/timrwood/moment/1.7.0/moment.js"></script>
<script type="text/x-handlebars">
    {{#view App.View userBinding=App.u}}
        {{view Ember.TextField }}
    {{/view}}
</script>

CSS

*    { font-family: helvetica; }
body { padding: 20px; }
h1 { font-weight: bold; font-size: 1.2em; }

CoffeeScript

App = Ember.Application.create()
App.View = Ember.View.extend(
    
)

App.fixtureStore = DS.Store.create({
    revision: 4,
    adapter: DS.fixtureAdapter
});

App.User = DS.Model.extend(
    id: DS.attr('number')
    created_at: DS.attr('date')
    
    toString: ->
        "#{@get('id')} #{@get('created_at')}"    
)

App.u = App.User.createRecord(
        id:1
        created_at: new Date()
    )