From 448dce2ce597937bb7af006065076c85d11d95ff Mon Sep 17 00:00:00 2001 From: Matthew Landauer Date: Wed, 13 Feb 2013 17:35:47 +1100 Subject: Redirects should be done with absolute urls --- app/controllers/user_controller.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'app/controllers/user_controller.rb') diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index f0e3cd0d3..22d5571ae 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -313,7 +313,7 @@ class UserController < ApplicationController post_redirect = PostRedirect.find_by_token(params[:pretoken]) do_post_redirect post_redirect else - redirect_to user_path(@user) + redirect_to user_url(@user) end end else @@ -388,7 +388,7 @@ class UserController < ApplicationController # Now clear the circumstance session[:user_circumstance] = nil flash[:notice] = _("You have now changed your email address used on {{site_name}}",:site_name=>site_name) - redirect_to user_path(@user) + redirect_to user_url(@user) end # Send a message to another user @@ -427,7 +427,7 @@ class UserController < ApplicationController params[:contact][:message] ) flash[:notice] = _("Your message to {{recipient_user_name}} has been sent!",:recipient_user_name=>CGI.escapeHTML(@recipient_user.name)) - redirect_to user_path(@recipient_user) + redirect_to user_url(@recipient_user) return end else @@ -476,7 +476,7 @@ class UserController < ApplicationController @user.set_profile_photo(@profile_photo) @draft_profile_photo.destroy flash[:notice] = _("Thank you for updating your profile photo") - redirect_to user_path(@user) + redirect_to user_url(@user) return end @@ -492,7 +492,7 @@ class UserController < ApplicationController if !@user.get_about_me_for_html_display.empty? flash[:notice] = _("Thank you for updating your profile photo") - redirect_to user_path(@user) + redirect_to user_url(@user) else flash[:notice] = _("

Thanks for updating your profile photo.

Next... You can put some text about you and your research on your profile.

") @@ -520,7 +520,7 @@ class UserController < ApplicationController end flash[:notice] = _("You've now cleared your profile photo") - redirect_to user_path(@user) + redirect_to user_url(@user) end # before they've cropped it @@ -571,7 +571,7 @@ class UserController < ApplicationController @user.save! if @user.profile_photo flash[:notice] = _("You have now changed the text about you on your profile.") - redirect_to user_path(@user) + redirect_to user_url(@user) else flash[:notice] = _("

Thanks for changing the text about you on your profile.

Next... You can upload a profile photograph too.

") -- cgit v1.2.3