• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pulibrary / tigerdata-app / 58384df5-4328-40b4-9cad-0ff5f77cb960

27 Oct 2025 02:45PM UTC coverage: 91.291%. Remained the same
58384df5-4328-40b4-9cad-0ff5f77cb960

push

circleci

web-flow
Place the file path on its own line on the project dashboard (#2097)

Co-authored-by: Hector Correa <hector_correa@princeton.edu>

2757 of 3020 relevant lines covered (91.29%)

752.67 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/app/presenters/dashboard_presenter.rb
1
# frozen_string_literal: true
2
class DashboardPresenter
4✔
3
  attr_reader :current_user
4✔
4
  def initialize(current_user:)
4✔
5
    @current_user = current_user
156✔
6
  end
7

8
  def all_projects
4✔
9
    return [] unless current_user&.eligible_sysadmin?
14✔
10

11
    @all_projects ||= Project.all_projects.map { |project| ProjectDashboardPresenter.new(project) }.sort_by(&:updated_at).reverse
32✔
12
    @all_projects
12✔
13
  end
14

15
  def dashboard_projects
4✔
16
    @dashboard_projects ||= Project.users_projects(current_user).map { |project| ProjectDashboardPresenter.new(project) }.sort_by(&:updated_at).reverse
298✔
17
    @dashboard_projects
134✔
18
  end
19

20
  def my_inventory_requests
4✔
21
    @my_inventory_requests ||= current_user.user_requests.where(type: "FileInventoryRequest")
4✔
22
  end
23

24
  def my_draft_requests
4✔
25
    @my_draft_requests ||= Request.where(requested_by: current_user.uid, state: Request::DRAFT)
136✔
26
  end
27

28
  def my_submitted_requests
4✔
29
    @my_submitted_requests ||= Request.where(requested_by: current_user.uid, state: Request::SUBMITTED)
136✔
30
  end
31
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc