Skip to content

Instantly share code, notes, and snippets.

@James1x0
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save James1x0/89c880bc269639839e63 to your computer and use it in GitHub Desktop.
Save James1x0/89c880bc269639839e63 to your computer and use it in GitHub Desktop.
import DS from "ember-data";
var attribute = DS.attr;
export default DS.Model.extend({
name: attribute({
first: attribute('string'),
last: attribute('string')
}),
time_stamp: attribute('string', {
defaultValue: function () {
return moment().format("YYYY/MM/DD HH:mm:ss");
}
})
});
@briangonzalez
Copy link

import DS from "ember-data";

var attribute = DS.attr;

export default DS.Model.extend({
  name: attribute(),
  time_stamp: attribute('string', {
        defaultValue: function () {
            return moment().format("YYYY/MM/DD HH:mm:ss");
        }
    })
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment