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

pulibrary / pdc_describe / 9cd1579d-9684-4b66-ae83-9619a7d64644

pending completion
9cd1579d-9684-4b66-ae83-9619a7d64644

Pull #1094

circleci

GitHub
Merge branch 'main' into sidekiq-prod
Pull Request #1094: Adding redis and sidekiq

1628 of 2126 relevant lines covered (76.58%)

97.58 hits per line

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

72.73
/app/models/collection_option.rb
1
# frozen_string_literal: true
2
class CollectionOption < ApplicationRecord
1✔
3
  EMAIL_MESSAGES = 0
1✔
4

5
  belongs_to :collection
1✔
6
  belongs_to :user
1✔
7

8
  enum option_type: { email_messages: 0 }
1✔
9

10
  # Provides a human-readable label for the type of the option
11
  # @note This should perhaps in the future parse from a YAML config. file
12
  # @return [String] the label
13
  def self.option_type_labels
1✔
14
    {
×
15
      email_messages: "E-mail messages for Collection notifications"
16
    }
17
  end
18

19
  # Finds the label for the option type value set for a given Model
20
  # @param [Integer] value the option type value
21
  # @return [String] the label
22
  def self.find_option_type_label(value)
1✔
23
    option_type_labels.fetch(value.to_sym, nil)
×
24
  end
25

26
  # Finds the label for the option type
27
  # @return [String] the label
28
  def option_type_label
1✔
29
    self.class.find_option_type_label(option_type)
×
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