title: Rails: where to put onload for a specific view
body: <p>I have a view that has some dynamic hierarchical selects (that is, the first influences the options available in the second). Refreshing keeps the option of the first selected but erases the options from the second select. I handle this by having an onload that initializes the second select. Currently I have that window.onload in [controller name].js.coffee, but that onload runs with every page in my project. Obviously, those 2 selects aren't on every page. How do I add it just to the pages that need it?</p>