mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-23 23:58:02 -05: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)
|
||||
@usesVersions = @schema()?.properties?.version?
|
||||
|
||||
created: -> new Date(parseInt(@id.substring(0, 8), 16) * 1000)
|
||||
|
||||
backupKey: ->
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue