Skip to content

Commit

Permalink
Disable ActionControllerFlashBeforeRender check, pending rubocop/rubo…
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeer committed Aug 30, 2024
1 parent 93c2cf6 commit ee6128a
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ Style/SwapValues: # new in 1.1
Style/YAMLFileRead: # new in 1.53
Enabled: true
Rails/ActionControllerFlashBeforeRender: # new in 2.16
Enabled: true
Enabled: false
Rails/ActionControllerTestCase: # new in 2.14
Enabled: true
Rails/ActionOrder: # new in 2.17
Expand Down
2 changes: 1 addition & 1 deletion app/components/access_panels/at_the_library_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module AccessPanels
class AtTheLibraryComponent < AccessPanels::Base
# @return [Array<Holdings::Library>] the list of libraries with holdings for the item
def libraries
@document.holdings.libraries.select(&:present?)
@document.holdings.libraries.compact_blank
end

def render?
Expand Down
2 changes: 1 addition & 1 deletion app/models/concerns/eds_links.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def eds_links
def eds_fulltext_links
fetch('eds_fulltext_links', []).map do |link_field|
EdsLinks::FulltextLink.new(link_field)
end.select(&:present?)
end.compact_blank
end

def eds_fulltext_links_as_searchworks_links
Expand Down
6 changes: 3 additions & 3 deletions app/models/sfx_data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,15 @@ def url
end

def coverage
target_xml.xpath('.//coverage_statement').map(&:text).select(&:present?)
target_xml.xpath('.//coverage_statement').map(&:text).compact_blank
end

def embargo
target_xml.xpath('.//embargo_statement').map(&:text).select(&:present?)
target_xml.xpath('.//embargo_statement').map(&:text).compact_blank
end

def note
target_xml.xpath('./note').map(&:text).select(&:present?)
target_xml.xpath('./note').map(&:text).compact_blank
end

private
Expand Down
2 changes: 1 addition & 1 deletion lib/holdings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def initialize(items = [], mhld = [])
end

def present?
libraries.select(&:present?).any? do |library|
libraries.compact_blank.any? do |library|
library.locations.any?(&:present?)
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
# directory. Alternatively, in the individual `*_spec.rb` files, manually
# require only the support files necessary.
#
Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }
Rails.root.glob('spec/support/**/*.rb').each { |f| require f }

# Checks for pending migrations and applies them before tests are run.
# If you are not using ActiveRecord, you can remove these lines.
Expand Down

0 comments on commit ee6128a

Please sign in to comment.