class PipelineController < ApplicationController before_action :require_current_project! def show @page_title = "Pipeline" @opportunities_by_stage = Catalog::PIPELINE_ORDER.index_with do |stage| opportunities_for_current_project.where(pipeline_stage: stage) .includes(:organization, :assigned_user, :tasks, organization: :contacts) .order(updated_at: :desc) end end end