diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-12-06 10:45:18 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-12-06 10:45:18 +0000 |
commit | fbe3828b1ad3df1b18857d933192f77832a35dc5 (patch) | |
tree | 3740a63731dc713a7134fd22b66f50ed9453e9e4 /app | |
parent | f2fd7905557d9fe2442eb577fc7e0c207356e648 (diff) | |
download | redmine-fbe3828b1ad3df1b18857d933192f77832a35dc5.tar.gz redmine-fbe3828b1ad3df1b18857d933192f77832a35dc5.zip |
Merged r14946 (#21382).
git-svn-id: http://svn.redmine.org/redmine/branches/3.2-stable@14952 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/watchers_controller.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/watchers_controller.rb b/app/controllers/watchers_controller.rb index 27d3f1598..917eb5ed2 100644 --- a/app/controllers/watchers_controller.rb +++ b/app/controllers/watchers_controller.rb @@ -62,12 +62,14 @@ class WatchersController < ApplicationController end def destroy - @watched.set_watcher(User.visible.find(params[:user_id]), false) + @watched.set_watcher(User.find(params[:user_id]), false) respond_to do |format| format.html { redirect_to :back } format.js format.api { render_api_ok } end + rescue ActiveRecord::RecordNotFound + render_404 end def autocomplete_for_user |