]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/application.rb
Make next and previous links on user/XXX/traces work. Fixes #501.
[rails.git] / app / controllers / application.rb
index 52aeff3cbe4c79db9e1539d0772ba72a8f24ed0c..328148fe18daf712f478e7372bd1cf7caeaf5640 100644 (file)
@@ -7,7 +7,7 @@ class ApplicationController < ActionController::Base
   end
 
   def require_user
-    redirect_to :controller => 'user', :action => 'login' unless @user
+    redirect_to :controller => 'user', :action => 'login', :next_controller => controller_name, :next_action => action_name unless @user
   end
 
   def authorize(realm='Web Password', errormessage="Couldn't authenticate you")