Skip to content

Commit

Permalink
Fixes Rubocop errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Scherz committed Apr 5, 2024
1 parent c624066 commit 09660eb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions app/forms/hyrax/generic_work_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 || ""
Expand Down
2 changes: 1 addition & 1 deletion config/initializers/hyrax.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 09660eb

Please sign in to comment.