diff options
Diffstat (limited to 'app/controllers/users_controller.rb')
-rw-r--r-- | app/controllers/users_controller.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 3c1a3534912..c35aa8e4346 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -35,7 +35,7 @@ class UsersController < ApplicationController feature_category :source_code_management, [:gpg_keys] # TODO: Set higher urgency after resolving https://gitlab.com/gitlab-org/gitlab/-/issues/357914 - urgency :low, [:show, :calendar_activities, :contributed, :activity, :projects, :groups, :calendar] + urgency :low, [:show, :calendar_activities, :contributed, :activity, :projects, :groups, :calendar, :snippets] urgency :default, [:followers, :following, :starred] urgency :high, [:exists] @@ -174,8 +174,9 @@ class UsersController < ApplicationController end def follow - current_user.follow(user) + followee = current_user.follow(user) + flash[:alert] = followee.errors.full_messages.join(', ') if followee&.errors&.any? redirect_path = referer_path(request) || @user redirect_to redirect_path |