• Tan Le's avatar
    Preload project associations on web search results · d4a9126c
    Tan Le authored
    This is to mirror the preloads logic on Projects::Dashboard
    controller. The dashboard and search view both share the same project
    view partial (i.e. `_project.html.haml`) and require similar project
    data for presentation.
    
    The N+1 test was failing to pick up this N+1 issue as it uses the same
    associations for project test data and these queries are cached. This
    change ensures that we skip cached queries and count everything.
    d4a9126c
search_controller.rb 3.05 KB