Project

General

Profile

Feature #7360 » fix-performance-when-rendering-sidebar.patch

Go MAEDA, 2021-08-02 16:42

View differences:

app/helpers/queries_helper.rb
465 465
      else
466 466
        {}
467 467
      end
468
    default_query_by_class =
469
      queries.map(&:class).uniq.to_h do |klass|
470
        [klass, klass.default(project: @project)]
471
      end
468 472
    content_tag('h3', title) + "\n" +
469 473
      content_tag(
470 474
        'ul',
......
473 477
          clear_link = +''
474 478
          clear_link_param = {:set_filter => 1, :sort => '', :project_id => @project}
475 479

  
476
          if query == query.class.default(project: @project)
480
          if query == default_query_by_class[query.class]
477 481
            css << ' default'
478 482
            clear_link_param[:without_default] = 1
479 483
          end
(11-11/14)