Skip to content

Commit

Permalink
Updated controllers to use root_path and login_path instead of / and …
Browse files Browse the repository at this point in the history
…/login respectfully
  • Loading branch information
Jim Neath committed Oct 2, 2008
1 parent 2391b02 commit 45daf3b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app/controllers/sessions_controller.rb
Expand Up @@ -16,7 +16,7 @@ def create
def destroy
logout_killing_session!
flash[:notice] = "You have been logged out."
redirect_back_or_default('/')
redirect_back_or_default(root_path)
end

def open_id_authentication
Expand Down Expand Up @@ -49,7 +49,7 @@ def password_authentication
def successful_login
new_cookie_flag = (params[:remember_me] == "1")
handle_remember_cookie! new_cookie_flag
redirect_back_or_default('/')
redirect_back_or_default(root_path)
flash[:notice] = "Logged in successfully"
end

Expand Down
8 changes: 4 additions & 4 deletions app/controllers/users_controller.rb
Expand Up @@ -28,13 +28,13 @@ def activate
when (!params[:activation_code].blank?) && user && !user.active?
user.activate!
flash[:notice] = "Signup complete! Please sign in to continue."
redirect_to '/login'
redirect_to login_path
when params[:activation_code].blank?
flash[:error] = "The activation code was missing. Please follow the URL from your email."
redirect_back_or_default('/')
redirect_back_or_default(root_path)
else
flash[:error] = "We couldn't find a user with that activation code -- check your email? Or maybe you've already activated -- try signing in."
redirect_back_or_default('/')
redirect_back_or_default(root_path)
end
end

Expand All @@ -58,7 +58,7 @@ def create_new_user(attributes)
end

def successful_creation(user)
redirect_back_or_default('/')
redirect_back_or_default(root_path)
flash[:notice] = "Thanks for signing up!"
flash[:notice] << " We're sending you an email with your activation code." if @user.not_using_openid?
flash[:notice] << " You can now login with your OpenID." unless @user.not_using_openid?
Expand Down

0 comments on commit 45daf3b

Please sign in to comment.