git-svn-id: http://svn.redmine.org/redmine/branches/4.1-stable@21237
e93f8b46-1217-0410-a6f0-
8f06a7374b81
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)