Skip to content

Commit

Permalink
Fixed accessing the login url directly when already logged in
Browse files Browse the repository at this point in the history
  • Loading branch information
ptn committed May 4, 2011
1 parent 5ae1659 commit 4f101e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/sessions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class SessionsController < ApplicationController
def new
unless session[:current_user_id].nil?
flash[:warn] = "You are already logged in"
redirect_to :back
redirect_to request['HTTP_REFERER'].nil? ? projects_path : :back
end
@hide_admin_links = true
end
Expand Down

0 comments on commit 4f101e3

Please sign in to comment.