mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-12 06:25:51 +03:00
0bfe99af72
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.
16 lines
456 B
JavaScript
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;
|