Project

General

Profile

Patch #26685 ยป Check_of_child_classes_of_all_levels_is_added.patch

Vladimir Litov, 2017-08-14 16:59

View differences:

lib/redmine/subclass_factory.rb (revision )
22 22
    end
23 23

  
24 24
    module ClassMethods
25
      def get_subclass(class_name)
25
      def get_descendant(class_name)
26 26
        klass = nil
27 27
        begin
28 28
          klass = class_name.to_s.classify.constantize
29 29
        rescue
30 30
          # invalid class name
31 31
        end
32
        unless subclasses.include? klass
32
        unless descendants.include? klass
33 33
          klass = nil
34 34
        end
35 35
        klass
app/controllers/queries_controller.rb (revision )
153 153
  # Returns the Query subclass, IssueQuery by default
154 154
  # for compatibility with previous behaviour
155 155
  def query_class
156
    Query.get_subclass(params[:type] || 'IssueQuery')
156
    Query.get_descendant(params[:type] || 'IssueQuery')
157 157
  end
158 158
end
    (1-1/1)