mirror of
https://github.com/meineerde/redmine.git
synced 2026-03-11 03:33:07 +00:00
Merged r21235 from trunk to 4.2-stable (#35463).
git-svn-id: http://svn.redmine.org/redmine/branches/4.2-stable@21236 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
09bb1ca420
commit
4158136f18
@ -158,7 +158,9 @@ class WatchersController < ApplicationController
|
||||
rescue
|
||||
nil
|
||||
end
|
||||
return unless klass && klass.respond_to?('watched_by')
|
||||
return unless klass && Class === klass # rubocop:disable Style/CaseEquality
|
||||
return unless klass < ActiveRecord::Base
|
||||
return unless klass < Redmine::Acts::Watchable::InstanceMethods
|
||||
|
||||
scope = klass.where(:id => Array.wrap(params[:object_id]))
|
||||
if klass.reflect_on_association(:project)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user