# Module DashboardHelper

- app/helpers/dashboard_helper.rb

Methods

D
  - dashboard_filter_path
E
  - entities_per_project

Instance Public methods
dashboard_filter_path(entity, options={}) Link

Source: show

    # File app/helpers/dashboard_helper.rb, line 2
    def dashboard_filter_path(entity, options={})
      exist_opts = {
        status: params[:status],
        project_id: params[:project_id],
      }

      options = exist_opts.merge(options)

      case entity
      when 'issue' then
        dashboard_issues_path(options)
      when 'merge_request'
        dashboard_merge_requests_path(options)
      end
    end

entities_per_project(project, entity) Link

Source: show

    # File app/helpers/dashboard_helper.rb, line 18
    def entities_per_project project, entity
      items = project.items_for(entity)

      items = case params[:status]
              when 'closed'
                items.closed
              when 'all'
                items
              else
                items.opened
              end

      items.where(assignee_id: current_user.id).count
    end