Use Editor.deserialize in Editor.prototype.copy and add a spec for it

This commit is contained in:
Corey Johnson & Nathan Sobo
2012-04-13 11:39:16 -06:00
parent da53fa1ba3
commit 54a15856bb
2 changed files with 15 additions and 1 deletions

View File

@@ -67,7 +67,7 @@ class Editor extends View
{ viewClass: "Editor", @editSessions, @activeEditSessionIndex, @isFocused }
copy: ->
new Editor(@serialize())
Editor.deserialize(@serialize())
bindKeys: ->
@on 'save', => @save()