I have a Rails web app working, and I am now working on a mobile app
request to my web app and render things if the request is make from
This is what I have in my controller action
render :controller => 'user_session', :action => 'new', :layout =>
render :controller => 'user', :action => 'new', :layout => false if
redirect_to login_path if params[:id].present?
redirect_to register_path if params[:id].blank?
HOST = 'localhost:3000';
I have two problem with this code, the first one is that it doesn't
recognize that I am making an Ajax request because it is going in the
else condition. And the second problem is that if I remove the if
statement I have rendering problem, it tries to render the new action
from the current controller.