app/controllers/application_controller.rb
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
Prevent CSRF attacks by raising an exception.
For APIs, you may want to use :null_session instead.
Prevent CSRF attacks by raising an exception . For APIs you may want to use : null_session instead .
def authenticate
    return true if User.current
    session[:jumpto] = request.parameters
    redirect_to root_path
    return false
  end
def authenticate return true if User . current session [ :jumpto ] = request . parameters redirect_to root_path return false end
Prevent CSRF attacks by raising an exception.
Prevent CSRF attacks by raising an exception .