Hello comrades, <br><br>I wondering if it's possible to redirect a browser in AJAX, i failed a few years but i didn't this group! I'm remaking the sliding panel the code in only a draft for now:<br><br>test_controller.rb<br>
# Login <br> def create<br> @user_session = UserSession.new(params[:user_session])<br> <br> if @user_session.save<br> # Login, Geat ! <br> if (request.xhr?)<br> # TODO: Find how it redirect <br>
render :text => "Login successful!"<br> end<br> else<br> # Login is wrong<br> @warning = "Wrong login or/and password!"<br> render :partial => "form_wide"<br>
end<br> end<br><br>I can make a normal form but if the login info is wrong, if feel that reloaded the entire page is a bit worthless.<br>Any help is help! I doubt i can it, do but invalidrecord stated you awesomeness.<br>
<br>Oliver Stocks <br>