diff options
author | Matthew Landauer <matthew@openaustralia.org> | 2013-02-13 17:35:47 +1100 |
---|---|---|
committer | Matthew Landauer <matthew@openaustralia.org> | 2013-02-15 12:22:23 +1100 |
commit | 448dce2ce597937bb7af006065076c85d11d95ff (patch) | |
tree | c59df307c46e35f6514265f97b6f92457227d22b /app/controllers/user_controller.rb | |
parent | 8bae996d578fd18af7f8490b01924fe4718628f0 (diff) |
Redirects should be done with absolute urls
Diffstat (limited to 'app/controllers/user_controller.rb')
-rw-r--r-- | app/controllers/user_controller.rb | 14 |
1 files changed, 7 insertions, 7 deletions
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] = _("<p>Thanks for updating your profile photo.</p> <p><strong>Next...</strong> You can put some text about you and your research on your profile.</p>") @@ -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] = _("<p>Thanks for changing the text about you on your profile.</p> <p><strong>Next...</strong> You can upload a profile photograph too.</p>") |