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

pulibrary / orangelight / 5583111e-2df9-4965-8722-73a1191b3c47

12 May 2026 01:33PM UTC coverage: 89.183% (-6.4%) from 95.538%
5583111e-2df9-4965-8722-73a1191b3c47

push

circleci

web-flow
Remove incorrect border-spacing rule (#5883)

border-spacing only has an effect on tables, but the facets
are presented as a list, not a table.

5936 of 6656 relevant lines covered (89.18%)

1268.1 hits per line

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

87.23
/app/controllers/feedback_controller.rb
1
# frozen_string_literal: true
2

3
class FeedbackController < ApplicationController
2✔
4
  include ApplicationHelper
2✔
5

6
  before_action :current_user_email
2✔
7
  before_action :build_feedback_form, only: [:create]
2✔
8
  before_action :build_ask_a_question_form, only: [:ask_a_question]
2✔
9
  before_action :build_suggest_correction_form, only: [:suggest_correction]
2✔
10
  before_action :build_missing_item_form, only: [:missing_item]
2✔
11

12
  def new
2✔
13
    @feedback_form = FeedbackForm.new if @feedback_form.nil?
2✔
14
    @feedback_form.current_url = request.referer || root_url
2✔
15
  end
16

17
  def create
2✔
18
    respond_to do |format|
2✔
19
      if @feedback_form.valid?
2✔
20
        result = @feedback_form.deliver
2✔
21
        if result == false
2✔
22
          format.js { flash.now[:error] = @feedback_form.ticket_submission_error_message }
2✔
23
        else
24
          format.js { flash.now[:notice] = I18n.t('blacklight.feedback.success') }
2✔
25
        end
26
      else
27
        format.js { flash.now[:error] = @feedback_form.error_message }
×
28
      end
29
    end
30
  end
31

32
  def ask_a_question; end
2✔
33

34
  def suggest_correction; end
2✔
35

36
  def missing_item; end
2✔
37

38
  protected
2✔
39

40
    def build_feedback_form
2✔
41
      @feedback_form = FeedbackForm.new(feedback_form_params)
2✔
42
      @feedback_form.request = request
2✔
43
      @feedback_form
2✔
44
    end
45

46
    def feedback_form_params
2✔
47
      params.expect(feedback_form: %i[name email message current_url feedback_desc])
2✔
48
    end
49

50
    def build_ask_a_question_form
2✔
51
      @question_form = AskAQuestionForm.new(
5✔
52
        context: page_url(question_form_params),
53
        title: question_form_params['title']
54
      )
55
    end
56

57
    def question_form_params
2✔
58
      params.expect(ask_a_question_form: %i[id title])
10✔
59
    end
60

61
    def build_suggest_correction_form
2✔
62
      @suggest_correction_form = SuggestCorrectionForm.new(
2✔
63
        context: page_url(suggest_correction_form_params),
64
        title: suggest_correction_form_params['title']
65
      )
66
    end
67

68
    def suggest_correction_form_params
2✔
69
      params.expect(suggest_correction_form: %i[id title])
4✔
70
    end
71

72
    def build_missing_item_form
2✔
73
      @missing_item_form = MissingItemForm.new(
×
74
        context: page_url(missing_item_form_params),
75
        title: missing_item_form_params['title']
76
      )
77
    end
78

79
    def missing_item_form_params
2✔
80
      params.expect(missing_item_form: %i[id title])
×
81
    end
82

83
    def page_url(params)
2✔
84
      solr_document_url(id: params['id'])
7✔
85
    end
86

87
    def current_user_email
2✔
88
      return if current_user.nil?
11✔
89
      return if current_user.provider != 'cas'
×
90
      @user_email = "#{current_user.uid}@princeton.edu"
×
91
      @user_email
×
92
    end
93
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