mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-05-01 00:15:00 -04:00
Add created function to CocoModel
This commit is contained in:
parent
f8616f7c3d
commit
fac71e64c9
1 changed files with 2 additions and 0 deletions
|
@ -22,6 +22,8 @@ class CocoModel extends Backbone.Model
|
||||||
@saveBackup = _.debounce(@saveBackup, 500)
|
@saveBackup = _.debounce(@saveBackup, 500)
|
||||||
@usesVersions = @schema()?.properties?.version?
|
@usesVersions = @schema()?.properties?.version?
|
||||||
|
|
||||||
|
created: -> new Date(parseInt(@id.substring(0, 8), 16) * 1000)
|
||||||
|
|
||||||
backupKey: ->
|
backupKey: ->
|
||||||
if @usesVersions then @id else @id # + ':' + @attributes.__v # TODO: doesn't work because __v doesn't actually increment. #2061
|
if @usesVersions then @id else @id # + ':' + @attributes.__v # TODO: doesn't work because __v doesn't actually increment. #2061
|
||||||
# if fixed, RevertModal will also need the fix
|
# if fixed, RevertModal will also need the fix
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue