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

MushroomObserver / mushroom-observer / 14217149209

02 Apr 2025 10:14AM UTC coverage: 93.77% (-0.04%) from 93.809%
14217149209

Pull #2856

github

nimmolo
Merge branch 'main' into query-scopes-am
Pull Request #2856: Query AR - final round PR branch

154 of 162 new or added lines in 29 files covered. (95.06%)

19 existing lines in 4 files now uncovered.

26492 of 28252 relevant lines covered (93.77%)

613.74 hits per line

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

92.31
/app/classes/query/users.rb
1
# frozen_string_literal: true
2

3
class Query::Users < Query::BaseNew
1✔
4
  def self.parameter_declarations
1✔
5
    super.merge(
183✔
6
      created_at: [:time],
7
      updated_at: [:time],
8
      id_in_set: [User],
9
      has_contribution: :boolean,
10
      pattern: :string
11
    )
12
  end
13

14
  # Declare the parameters as attributes of type `query_param`
15
  parameter_declarations.each_key do |param_name|
1✔
16
    attribute param_name, :query_param
6✔
17
  end
18

19
  def model
1✔
20
    @model ||= User
365✔
21
  end
22

23
  def alphabetical_by
1✔
24
    @alphabetical_by ||= case params[:order_by].to_s
6✔
25
                         when "login", "reverse_login"
NEW
26
                           User[:login]
×
27
                         else
28
                           User[:name]
6✔
29
                         end
30
  end
31

32
  def self.default_order
1✔
33
    :name
22✔
34
  end
35
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