Implement update functions for both if and unless binders. [#183]
Showing
1 changed file
with
6 additions
and
0 deletions
... | @@ -408,6 +408,9 @@ Rivets.binders = | ... | @@ -408,6 +408,9 @@ Rivets.binders = |
408 | @nested.unbind() | 408 | @nested.unbind() |
409 | delete @nested | 409 | delete @nested |
410 | 410 | ||
411 | update: (models) -> | ||
412 | @nested.update models | ||
413 | |||
411 | unless: | 414 | unless: |
412 | block: true | 415 | block: true |
413 | 416 | ||
... | @@ -420,6 +423,9 @@ Rivets.binders = | ... | @@ -420,6 +423,9 @@ Rivets.binders = |
420 | routine: (el, value) -> | 423 | routine: (el, value) -> |
421 | Rivets.binders.if.routine.call @, el, not value | 424 | Rivets.binders.if.routine.call @, el, not value |
422 | 425 | ||
426 | update: (models) -> | ||
427 | Rivets.binders.if.update.call @, models | ||
428 | |||
423 | "on-*": | 429 | "on-*": |
424 | function: true | 430 | function: true |
425 | 431 | ... | ... |
-
Please register or sign in to post a comment