Created
November 23, 2015 06:06
-
-
Save zkwentz/5362d5075755c24f26d2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
`import DS from 'ember-data'` | |
Post = DS.Model.extend( | |
title: DS.attr('string') | |
body: DS.attr('string') | |
comments: DS.hasMany('comment',async:true) | |
user: DS.belongsTo('user',async:true) | |
validations: | |
user: | |
belongsTo: | |
message: "cannot be blank." | |
title: | |
presence: true | |
body: | |
presence: true | |
) | |
`export default Post` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment