Skip to content

Commit

Permalink
destroyAll can accept the options
Browse files Browse the repository at this point in the history
  • Loading branch information
sishen committed Mar 29, 2013
1 parent 6395da1 commit 1750996
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions lib/spine.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions src/spine.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,9 @@ class Model extends Module
for key, value of @records
delete @records[key]

@destroyAll: ->
@destroyAll: (options) ->
for key, value of @records
@records[key].destroy()
@records[key].destroy(options)

@update: (id, atts, options) ->
@find(id).updateAttributes(atts, options)
Expand Down Expand Up @@ -291,9 +291,8 @@ class Model extends Module
this

updateAttribute: (name, value, options) ->
atts = {}
atts[name] = value
@updateAttributes(atts, options)
@[name] = value
@save(options)

updateAttributes: (atts, options) ->
@load(atts)
Expand Down

0 comments on commit 1750996

Please sign in to comment.