My code:
# app/controllers/log_controller.rb
class LogController < ApplicationController
def in
@user = User.login(params[:login])
respond_to do |format|
format.js
end
end
end
# app/views/log/in.js.erb
redirect_to("/myprofile")
# public/javascript/application.js
function redirect_to(url) { location.href = url; }
In FF and Chrome and Safari and every browser works great. The user log in the system and redirects to her profile, but in explorer it ask for downloading files! You know, that little yellow bar asking the user to download a file. I think is mistaking the ajax orders with files but... why?