Ghost/ghost/admin/models/role.js
Jason Williams 0bfe99af72 Extend adapter to support automatic includes
Closes #3325
- Add Roles model and add hasMany roles to User model.
- Add EmbeddedRelationAdapter that will automatically include
  hasMany relations in calls to the API.
- UserAdapter and PostAdapter now extend EmbeddedRelationAdapter
  and all explicit includes from store.find() have been removed.
2014-07-21 17:05:13 +00:00

16 lines
456 B
JavaScript

var Role = DS.Model.extend({
uuid: DS.attr('string'),
name: DS.attr('string'),
description: DS.attr('string'),
created_at: DS.attr('moment-date'),
created_by: DS.belongsTo('user', { async: true }),
updated_at: DS.attr('moment-date'),
updated_by: DS.belongsTo('user', { async: true }),
lowerCaseName: Ember.computed('name', function () {
return this.get('name').toLocaleLowerCase();
})
});
export default Role;