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

pulibrary / orangelight / 001dcc85-9d64-4494-abf5-4411fe476b8f

13 Sep 2024 01:13PM UTC coverage: 96.27% (+0.01%) from 96.26%
001dcc85-9d64-4494-abf5-4411fe476b8f

Pull #4331

circleci

sandbergja
[#4130] Use libanswers API for SuggestCorrectionForm
Pull Request #4331: Use libanswers API for Suggest a Correction form

10 of 10 new or added lines in 4 files covered. (100.0%)

3 existing lines in 2 files now uncovered.

6013 of 6246 relevant lines covered (96.27%)

1442.1 hits per line

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

94.12
/app/forms/suggest_correction_form.rb
1
# frozen_string_literal: true
2

3
class SuggestCorrectionForm
3✔
4
  include ActiveModel::Model
3✔
5
  include Honeypot
3✔
6

7
  attr_accessor :name, :email, :message, :context, :title
3✔
8

9
  validates :name, :email, :message, :context, presence: true
3✔
10
  validates :email, email: true
3✔
11

12
  def submit
3✔
13
    unless spam?
3✔
14
      RecordFeedbackFormSubmission.new(
1✔
15
        message:,
16
        patron_name: name,
17
        patron_email: email,
18
        title: "[Catalog] #{title}",
19
        context:,
20
        quid: Rails.application.config_for(:orangelight)[:suggest_correction_form][:queue_id]
21
      ).send_to_libanswers
22
    end
23
    @submitted = true
3✔
24
    @name = ""
3✔
25
    @email = ""
3✔
26
    @message = ""
3✔
27
  end
28

29
  def submitted?
3✔
30
    @submitted == true
1✔
31
  end
32

33
  def routed_mail_to
3✔
UNCOV
34
    Orangelight.config["suggest_correction_form"]["to"]
×
35
  end
36
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