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

pulibrary / orangelight / 4c391e0e-519a-40cb-8ad3-354445f4ce03

12 Aug 2025 08:47PM UTC coverage: 85.348% (-10.0%) from 95.335%
4c391e0e-519a-40cb-8ad3-354445f4ce03

push

circleci

web-flow
[#5143] Use access restriction note as Aeon ItemInfo1 if available (#5173)

With this commit, if a user visits a record with an access
restrictions note and presses the Reading Room Request
button, they will get to an Aeon form with the 'Restrictions'
field pre-filled with the restriction note.

If the record does not have an access restrictions note,
the field will be pre-filled with 'Reading Room Access Only',
as it has been previously.

Closes #5143

5493 of 6436 relevant lines covered (85.35%)

251.82 hits per line

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

83.33
/app/forms/feedback_form.rb
1
# frozen_string_literal: true
2

3
class FeedbackForm
1✔
4
  include ActiveModel::Model
1✔
5
  include Honeypot
1✔
6

7
  attr_accessor :name, :email, :message, :current_url, :request
1✔
8
  validates :name, :email, :message, presence: true
1✔
9
  validates :email, email: true
1✔
10

11
  def deliver
1✔
12
    return if spam?
1✔
13
    return unless valid?
1✔
14

15
    FeedbackFormSubmission.new(
1✔
16
      message:, patron_name: name, patron_email: email, user_agent:, current_url:
17
    ).send_to_libanswers
18
  end
19

20
  def headers
1✔
21
    {
22
      subject: "#{I18n.t(:'blacklight.application_name')} Feedback Form",
×
23
      to: Orangelight.config["feedback_form"]["to"],
24
      from: %("#{name}" <#{email}>),
25
      cc: Orangelight.config["feedback_form"]["cc"]
26
    }
27
  end
28

29
  def error_message
1✔
30
    I18n.t(:'blacklight.feedback.error').to_s
×
31
  end
32

33
  def remote_ip
1✔
34
    request&.remote_ip
×
35
  end
36

37
  def user_agent
1✔
38
    request&.user_agent
1✔
39
  end
40
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