New helper: contentFor(name, content)

In layout:

    <%- contentFor('javascripts') %>

In view:

    <% contentFor('javascripts', javascriptIncludeTag('view-specific-javascipt')) %>

This will add some view-specific content to layout. This method also could be called from controller.