Skip to content

Commit

Permalink
Fix rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
Genia Kazymova committed Jan 16, 2025
1 parent 0949948 commit 9f934a6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.0
3.0.1
3 changes: 1 addition & 2 deletions lib/trln_argon/argon_search_builder/subjects_boost.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ def advanced_search_title_boost

def includes_subject_search?
blacklight_params.key?('search_field') &&
((blacklight_params['search_field'] == 'subject' ||
blacklight_params['search_field'] == 'genre_headings') ||
(['subject', 'genre_headings'].include?(blacklight_params['search_field']) ||
(blacklight_params['search_field'] == 'advanced' &&
blacklight_params.fetch('subject', nil).present?))
end
Expand Down
3 changes: 2 additions & 1 deletion lib/trln_argon/solr_document.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ def names_to_text
end

def creators_to_text
names.select { |n| n[:type] == 'creator' || n[:type] == 'director' || n[:type] == 'no_rel' || n[:type] == '' }
valid_types = ['creator', 'director', 'no_rel', '']
names.select { |n| valid_types.include?(n[:type]) }
.map { |n| n[:name] }.reject(&:empty?)
end

Expand Down

0 comments on commit 9f934a6

Please sign in to comment.