From 44c4fbccec3aa424dd487ca2a72a117968120f15 Mon Sep 17 00:00:00 2001 From: Martin Simpson Date: Thu, 7 Mar 2024 21:29:30 +0700 Subject: [PATCH] JSON Fields Actor --- lib/hyku_knapsack/engine.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/hyku_knapsack/engine.rb b/lib/hyku_knapsack/engine.rb index 322f175..60c4901 100644 --- a/lib/hyku_knapsack/engine.rb +++ b/lib/hyku_knapsack/engine.rb @@ -27,6 +27,10 @@ class Engine < ::Rails::Engine config.after_initialize do my_engine_root = HykuKnapsack::Engine.root.to_s paths = ActionController::Base.view_paths.collect{|p| p.to_s} + + # Remove the Hyrax Orcid JSON Actor as we have our own - this should not be namespaced + Hyrax::CurationConcern.actor_factory.middlewares.delete(Hyrax::Actors::Orcid::JSONFieldsActor) + # This is the opposite of what you usually want to do. Normally app views override engine views # but in our case things in the Knapsack override what is in the application paths = [my_engine_root + '/app/views'] + paths