From 72c59b010bfe01069e94641ac66ac66751af581d Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Thu, 5 Nov 2020 13:41:44 +0000 Subject: [PATCH] use "do end" instead of {} at WatchersController git-svn-id: http://svn.redmine.org/redmine/trunk@20258 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/watchers_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/watchers_controller.rb b/app/controllers/watchers_controller.rb index 567d61f0c..645e60fe2 100644 --- a/app/controllers/watchers_controller.rb +++ b/app/controllers/watchers_controller.rb @@ -111,10 +111,10 @@ class WatchersController < ApplicationController watchable.set_watcher(user, watching) end respond_to do |format| - format.html { + format.html do text = watching ? 'Watcher added.' : 'Watcher removed.' redirect_to_referer_or {render :html => text, :status => 200, :layout => true} - } + end format.js { render :partial => 'set_watcher', :locals => {:user => user, :watched => watchables} } end end