Skip to content

Instantly share code, notes, and snippets.

@Blackmist
Created May 13, 2013 15:41
Show Gist options
  • Save Blackmist/5569268 to your computer and use it in GitHub Desktop.
Save Blackmist/5569268 to your computer and use it in GitHub Desktop.
Post model, create an instance of the adapter
var attr = Ember.attr;
//define model
App.Post = Ember.Model.extend({
id: attr('number'),
title: attr('string'),
author: attr('string'),
body: attr('string'),
posted: attr('date')
});
//Point the adapter at the table you want to use.
App.Post.adapter = Ember.WAMAdapter.create({ table: client.getTable('posts') });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment