Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #520 from CristinaRO/Issue_2946_profile_no_user

Issue 2946: loading profile of a non-existent user
  • Loading branch information...
commit fb4af7e26e9200f6fd05845dd262517bd76d004c 2 parents 0391019 + e3e3cbe
@elzj elzj authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 app/controllers/profile_controller.rb
View
4 app/controllers/profile_controller.rb
@@ -3,8 +3,8 @@ class ProfileController < ApplicationController
def show
@user = User.find_by_login(params[:user_id])
if @user.nil?
- flash[:error] = t('invalid_user', :default => "Sorry, there's no user by that name.")
- redirect_to '/'
+ flash[:error] = ts("Sorry, there's no user by that name.")
+ redirect_to '/' and return
elsif @user.profile.nil?
Profile.create(:user_id => @user.id)
@user.reload
Please sign in to comment.
Something went wrong with that request. Please try again.