Skip to content

Commit

Permalink
Update lib/blacklight/component.rb
Browse files Browse the repository at this point in the history
Co-authored-by: Benjamin Armintor <armintor@gmail.com>
  • Loading branch information
jcoyne and barmintor committed Nov 4, 2022
1 parent 8bd6800 commit b364fb6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion blacklight.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Gem::Specification.new do |s|
s.add_dependency "kaminari", ">= 0.15" # the pagination (page 1,2,3, etc..) of our search results
s.add_dependency "i18n", '>= 1.7.0' # added named parameters
s.add_dependency "ostruct", '>= 0.3.2'
s.add_dependency "view_component", '~> 2.43'
s.add_dependency "view_component", '~> 2.66'

s.add_development_dependency "rsolr", ">= 1.0.6", "< 3" # Library for interacting with rSolr.
s.add_development_dependency "rspec-rails", "~> 6.0"
Expand Down
7 changes: 3 additions & 4 deletions lib/blacklight/component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
module Blacklight
class Component < ViewComponent::Base
class << self
def inherited(subclass)
# Workaround for https://github.com/ViewComponent/view_component/issues/1565
subclass.config = ViewComponent::Base.config
super
# Workaround for https://github.com/ViewComponent/view_component/issues/1565
def config
@config ||= ViewComponent::Config.defaults.merge(ViewComponent::Base.config)
end

# rubocop:disable Naming/MemoizedInstanceVariableName
Expand Down

0 comments on commit b364fb6

Please sign in to comment.