Skip to content

Commit 0804fb2

Browse files
authored
Call super with no arguments in components for view_component v4 (#1620)
1 parent 18dd98b commit 0804fb2

16 files changed

Lines changed: 17 additions & 17 deletions

app/components/arclight/access_component.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module Arclight
44
# Render access information for a document
55
class AccessComponent < ViewComponent::Base
66
def initialize(presenter:)
7-
super
7+
super()
88
@show_config = presenter.configuration.show
99
@presenter = presenter
1010
end

app/components/arclight/breadcrumb_component.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def initialize(document:, count: nil, offset: 0)
88
@document = document
99
@count = count
1010
@offset = offset
11-
super
11+
super()
1212
end
1313

1414
def call

app/components/arclight/breadcrumbs_hierarchy_component.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class BreadcrumbsHierarchyComponent < ViewComponent::Base
77
delegate :blacklight_icon, to: :helpers
88

99
def initialize(presenter:)
10-
super
10+
super()
1111

1212
@presenter = presenter
1313
collections, @parents_under_collection = document.parents.partition(&:collection?)

app/components/arclight/collection_context_component.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module Arclight
44
# Render various actions for a collection (e.g. requesting, download links, etc)
55
class CollectionContextComponent < ViewComponent::Base
66
def initialize(presenter:, download_component:)
7-
super
7+
super()
88

99
@collection = presenter.document.collection
1010
@download_component = download_component

app/components/arclight/collection_info_component.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module Arclight
44
# Render information about the collection
55
class CollectionInfoComponent < ViewComponent::Base
66
def initialize(collection:)
7-
super
7+
super()
88

99
@collection = collection
1010
end

app/components/arclight/collection_sidebar_component.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module Arclight
44
# Draw the links to the collection info in the sidebar
55
class CollectionSidebarComponent < ViewComponent::Base
66
def initialize(document:, partials:, collection_presenter:)
7-
super
7+
super()
88

99
@document = document
1010
@partials = Array(partials)

app/components/arclight/document_components_hierarchy_component.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module Arclight
66
class DocumentComponentsHierarchyComponent < ViewComponent::Base
77
# rubocop:disable Metrics/ParameterLists
88
def initialize(document: nil, target_index: -1, minimum_pagination_size: 20, left_outer_window: 3, maximum_left_gap: 10, window: 10)
9-
super
9+
super()
1010

1111
@document = document
1212
@target_index = target_index&.to_i || -1

app/components/arclight/document_download_component.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module Arclight
44
# ViewComponent for rendering a single document download link
55
class DocumentDownloadComponent < ViewComponent::Base
66
def initialize(downloads:, **kwargs)
7-
super
7+
super()
88

99
@downloads = downloads
1010
@link_options = kwargs

app/components/arclight/embed_component.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
module Arclight
44
# Render digital object links for a document
55
class EmbedComponent < ViewComponent::Base
6-
def initialize(document:, presenter:, **kwargs)
7-
super
6+
def initialize(document:, presenter:, **kwargs) # rubocop:disable Lint/UnusedMethodArgument
7+
super()
88

99
@document = document
1010
@presenter = presenter

app/components/arclight/expand_hierarchy_button_component.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module Arclight
44
# Component for rendering an expand button inside the hierarchy view
55
class ExpandHierarchyButtonComponent < Blacklight::Component
66
def initialize(path:, classes: 'btn btn-secondary btn-sm')
7-
super
7+
super()
88
@path = path
99
@classes = classes
1010
end

0 commit comments

Comments
 (0)