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

pulibrary / bibdata / 010cdbf8-27fb-4569-b695-f7eca55b1bcc

30 May 2025 10:09PM UTC coverage: 42.382% (-49.3%) from 91.682%
010cdbf8-27fb-4569-b695-f7eca55b1bcc

push

circleci

sandbergja
Refactor from Generics to a Type alias for clarity

Instead of using a generic type <T>, we give these closures specific type aliases,
CommunityIdSelector and CollectionIdsSelector, that gives more insight about what
they do.

As a bonus, this makes the compiled binary slighlty smaller.

1630 of 3846 relevant lines covered (42.38%)

2.45 hits per line

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

75.0
/app/controllers/libraries_controller.rb
1
# frozen_string_literal: true
2

3
class LibrariesController < ApplicationController
1✔
4
  before_action :set_library, only: %i[show]
1✔
5

6
  # GET /libraries
7
  def index
1✔
8
    @libraries = Library.all.order(:order, :label)
×
9
  end
10

11
  # GET /libraries/1
12
  def show; end
1✔
13

14
  private
1✔
15

16
    # Use callbacks to share common setup or constraints between actions.
17
    def set_library
1✔
18
      # nosemgrep
19
      @library = Library.friendly.find(params[:id])
×
20
    end
21
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

© 2026 Coveralls, Inc