Inlining js responses from an action

I am learning rails and encountered the respond_to for a javascript response, and was wondering if there is a way to inline it within the actual respond_to block as opposde to cluttering up my project directory with rjs files that only have one line of code. Is there a way to execute javascript insde the respond_to block rather than returning an rjs file?

That's what render :update does.


Awesome, thanks