Include JavaScript from view helpers

From what I read of the API this is not possible as "render :file" is

treated like "render :action", but without the layout applied.

Perhaps you could create a instance variable to read the file into,
then append the javascript to it? I have not looked at file handling
in Ruby yet, but it seems easy enough.