mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-04 17:04:59 +03:00
c4371a36f2
closes #6018 - added keyForAttribute method in application serializer - override keyForAttribute in settings serializer to not apply camelCase/underscore conversion - rename under_scored properties to camelCased
21 lines
535 B
JavaScript
21 lines
535 B
JavaScript
/* jscs:disable requireCamelCaseOrUpperCaseIdentifiers */
|
|
import Ember from 'ember';
|
|
import Model from 'ember-data/model';
|
|
import attr from 'ember-data/attr';
|
|
|
|
const {computed} = Ember;
|
|
|
|
export default Model.extend({
|
|
uuid: attr('string'),
|
|
name: attr('string'),
|
|
description: attr('string'),
|
|
createdAt: attr('moment-date'),
|
|
updatedAt: attr('moment-date'),
|
|
createdBy: attr(),
|
|
updatedBy: attr(),
|
|
|
|
lowerCaseName: computed('name', function () {
|
|
return this.get('name').toLocaleLowerCase();
|
|
})
|
|
});
|