Rails 2.3.18
I have a Answer
controller with an index function like this :
def index
respond_to do |format|
format.js { }
format.all { redirect_to ... }
end
end
I have a anwers/index.js.erb
associated to this index action, for :js
format.
I just enter URL /answers/
in my browser to call the index function, and the result is surprising : this is the index.js
displayed as a text.
Something is wrong with this, but I don't understand what !
I log the mime type on the index action, and this is "text/html", corresponding to :html format. Why :js
format is called instead of :all
format ?
Regards