diff --git a/app/indexers/concerns/iiif_print/child_indexer.rb b/app/indexers/concerns/iiif_print/child_indexer.rb index e91cced9..9235521a 100644 --- a/app/indexers/concerns/iiif_print/child_indexer.rb +++ b/app/indexers/concerns/iiif_print/child_indexer.rb @@ -13,7 +13,8 @@ def self.decorate_work_types! # Hyrax.config.curation_concerns.each do |work_type| - next unless work_type.respond_to?(:iiif_print_config) + next unless work_type.respond_to?(:iiif_print_config?) + next unless work_type.iiif_print_config? work_type.send(:include, IiifPrint::SetChildFlag) unless work_type.included_modules.include?(IiifPrint::SetChildFlag) indexer = work_type.indexer diff --git a/lib/iiif_print.rb b/lib/iiif_print.rb index 9d209384..8eabfd56 100644 --- a/lib/iiif_print.rb +++ b/lib/iiif_print.rb @@ -131,8 +131,8 @@ def self.model_configuration(**kwargs) Module.new do extend ActiveSupport::Concern - included do - class_attribute :iiif_print_config, default: true + class_method do + def iiif_print_config?; true; end end # We don't know what you may want in your configuration, but from this gems implementation, @@ -144,6 +144,8 @@ def self.model_configuration(**kwargs) define_method(:iiif_print_config) do @iiif_print_config ||= ModelConfig.new(**kwargs) end + + def iiif_print_config?; true; end end end