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?

On Sep 14, 12:33 pm, indigo0086 [email protected] wrote:

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.

Fred

Awesome, thanks

On Sep 14, 8:13 am, Frederick C. [email protected]