mikeric/rivets — pull request #115 by adheerajkumar (2013-01-13 00:41:49+00:00)
Title: Dynamic select

This fixes #75

There's a test case demonstrating this issue in functional.js, and a one-liner in rivets.coffee to make it pass.

I don't know if there's a better one, but this is my way:

1. Check if the current node is an option tag.
This is because the select tag is probably the only one where setting a value involves modifying its child elements, and not itself.

2. Loop through the bindings of the parent view, and pick all the value bindings which belong to its parent select tag.

3. Call sync() on those bindings.