From 09660eb4bf41d3259e4243d9861a18d6ea58565f Mon Sep 17 00:00:00 2001 From: Thomas Scherz Date: Fri, 5 Apr 2024 13:33:52 -0400 Subject: [PATCH] Fixes Rubocop errors. --- app/forms/hyrax/generic_work_form.rb | 20 ++++++++++---------- config/initializers/hyrax.rb | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/forms/hyrax/generic_work_form.rb b/app/forms/hyrax/generic_work_form.rb index b0de3a2f..48b5458f 100644 --- a/app/forms/hyrax/generic_work_form.rb +++ b/app/forms/hyrax/generic_work_form.rb @@ -38,17 +38,17 @@ def self.model_attributes(_) attrs end - def self.model_attributes(attributes) - attrs = super - return attrs unless attributes[:title] + # def self.model_attributes(attributes) + # attrs = super + # return attrs unless attributes[:title] - attrs[:title] = Array(attributes[:title]) - return attrs if attributes[:alternate_title].nil? - Array(attributes[:alternate_title]).each do |value| - attrs["title"] << value if value != "" - end - attrs - end + # attrs[:title] = Array(attributes[:title]) + # return attrs if attributes[:alternate_title].nil? + # Array(attributes[:alternate_title]).each do |value| + # attrs["title"] << value if value != "" + # end + # attrs + # end def title super.first || "" diff --git a/config/initializers/hyrax.rb b/config/initializers/hyrax.rb index ae7e277c..b365a557 100644 --- a/config/initializers/hyrax.rb +++ b/config/initializers/hyrax.rb @@ -151,7 +151,7 @@ # end # Returns a URL that resolves to an info.json file provided by a IIIF image server - config.iiif_info_url_builder = lambda do |file_id, base_url, size, format| + config.iiif_info_url_builder = lambda do |file_id, base_url, _size, _format| uri = Riiif::Engine.routes.url_helpers.info_url(file_id, host: base_url) uri.sub(%r{/info\.json\Z}, '') end