Skip to content

Commit

Permalink
Refactor post model to use DS with destructuring assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
ericdouglas committed Aug 16, 2015
1 parent 1c4ff25 commit 97be18a
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions app/models/post.js
@@ -1,8 +1,13 @@
import DS from 'ember-data';

export default DS.Model.extend({
title: DS.attr('string'),
author: DS.attr('string'),
createdDate: DS.attr('date'),
text: DS.attr('string')
let {
Model,
attr
} = DS;

export default Model.extend({
title: attr('string'),
author: attr('string'),
createdDate: attr('date'),
text: attr('string')
});

0 comments on commit 97be18a

Please sign in to comment.