Force the format "reply_do"

I am using RJS with Prototype. In my controller, I have this code:

def method_name
    respond_to do |format|
        ...
        format.html
        format.js
    end
en

Is it possible to force "reply_do" to use "format.html", is the request an HTML or JAVA or not? If so, how to do it?

+3
source share
1 answer

Do not use response_to. Just return the controller action or call the render if you want to specify a specific view.

+1
source

Source: https://habr.com/ru/post/1781259/


All Articles