Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
11 lines (8 sloc) 254 Bytes
App.Post = Ember.Resource.extend
resourceIdField: '_id'
resourceUrl: '/posts'
resourceName: 'post'
resourceProperties: ['title', 'body']
validate: ->
if (@get('title') is undefined) or (@get('title') is '')
'Posts require a title.'