mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-15 03:12:54 +03:00
9eac05e082
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();
|
|
})
|
|
});
|