Redmine 4.1.7
This commit is contained in:
parent
55458d3479
commit
3ca3c37487
103 changed files with 2426 additions and 431 deletions
|
@ -134,7 +134,9 @@ class WatchersController < ApplicationController
|
|||
|
||||
def find_objets_from_params
|
||||
klass = Object.const_get(params[:object_type].camelcase) rescue nil
|
||||
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…
Add table
Add a link
Reference in a new issue