respond_to do |format|
format.html
format.js { render :template => "login" }
end
Whenever I send an AJAX request to the action that has that code it says
it cant find the template login.js. Why isnt it looking for login.rjs?
Also when I take out the render it serves up the rhtml template instead
of the rjs template. Any idea why this is? I am using edge rails and the
latest version of mongrel.
respond_to do |format|
format.html
format.js { render :template => “login” }
end
Whenever I send an AJAX request to the action that has that code it says
it cant find the template login.js
. Why isnt it looking for login.rjs?
Also when I take out the render it serves up the rhtml template instead
of the rjs template. Any idea why this is? I am using edge rails and the
latest version of mongrel.
Actually Ryan, AJAX is a javascript request (Async Javascript And XML). I use format.js quite extensively in one of my projects to differentiate from local AJAX and external XML requests.