Skip to content

Commit

Permalink
🐛 Move SimpleSchemaLoader to initializer
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirk Wang committed Jan 31, 2024
1 parent 966038b commit 1ccdccc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 1 addition & 0 deletions config/initializers/simple_schema_loader.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Hyrax::SimpleSchemaLoader.prepend(IiifPrint::SimpleSchemaLoaderDecorator)
3 changes: 0 additions & 3 deletions lib/iiif_print/persistence_layer/valkyrie_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ def self.object_ordered_works(object)
# @param work_type [Class<Valkyrie::Resource>]
# @return the indexer for the given :work_type
def self.decorate_with_adapter_logic(work_type:)
# Originally prepended in the engine.rb but this placement loads it sooner.
Hyrax::SimpleSchemaLoader.prepend(IiifPrint::SimpleSchemaLoaderDecorator)

work_type.send(:include, Hyrax::Schema(:child_works_from_pdf_splitting)) unless work_type.included_modules.include?(Hyrax::Schema(:child_works_from_pdf_splitting))
# TODO: Use `Hyrax::ValkyrieIndexer.indexer_class_for` once changes are merged.
indexer = "#{work_type}Indexer".constantize
Expand Down

0 comments on commit 1ccdccc

Please sign in to comment.