From 972d0674ef59e5f0ac919df476ae9e5a467f8676 Mon Sep 17 00:00:00 2001 From: Kirk Wang Date: Fri, 15 Mar 2024 10:30:20 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=81=20Add=20SimpleSchemaLoaderDecorato?= =?UTF-8?q?r=20for=20work=20types?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This decorator needs to be in play for the work types to load their respective yaml files. --- .../hyrax/simple_schema_loader_decorator.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 app/services/hyrax/simple_schema_loader_decorator.rb diff --git a/app/services/hyrax/simple_schema_loader_decorator.rb b/app/services/hyrax/simple_schema_loader_decorator.rb new file mode 100644 index 0000000..7a9810c --- /dev/null +++ b/app/services/hyrax/simple_schema_loader_decorator.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +# OVERRIDE Hyrax v5.0.0 to add schemas that are located in config/metadata/*.yaml + +module Hyrax + module SimpleSchemaLoaderDecorator + def config_search_paths + super + [HykuKnapsack::Engine.root] + end + end +end + +Hyrax::SimpleSchemaLoader.prepend(Hyrax::SimpleSchemaLoaderDecorator)