Skip to content

Commit

Permalink
Wrap willow_sword initializer in after_initialize (#2214)
Browse files Browse the repository at this point in the history
We had to do this because the willow_sword initializer called Hyrax
which created loading issues with the SimpleSchemaLoaderDecorator in
HykuKnapsack.
  • Loading branch information
kirkkwang authored May 15, 2024
1 parent c7a05b1 commit 95dd5bd
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions config/initializers/willow_sword.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# frozen_string_literal: true

# Overriding the default config values
WillowSword.setup do |config|
config.work_models = Hyrax.config.registered_curation_concern_types
config.collection_models = [Hyrax.config.collection_model]
config.file_set_models = [Hyrax.config.file_set_model]
config.default_work_model = Hyrax.config.curation_concerns.first
Rails.application.config.after_initialize do
WillowSword.setup do |config|
config.work_models = Hyrax.config.registered_curation_concern_types
config.collection_models = [Hyrax.config.collection_model]
config.file_set_models = [Hyrax.config.file_set_model]
config.default_work_model = Hyrax.config.curation_concerns.first
end
end

0 comments on commit 95dd5bd

Please sign in to comment.