Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set valkyrie models as default in Hyrax.config #6715

Merged
merged 1 commit into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .dassie/config/initializers/hyrax.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@
# config.collection_model = 'Hyrax::PcdmCollection' # collection without basic metadata
# config.collection_model = 'CollectionResource' # collection with basic metadata
# config.admin_set_model = 'Hyrax::AdministrativeSet'

# dassie needs legacy AF models
config.collection_model = '::Collection'
config.admin_set_model = 'AdminSet'
config.file_set_model = '::FileSet'
end

Date::DATE_FORMATS[:standard] = "%m/%d/%Y"
Expand Down
10 changes: 5 additions & 5 deletions lib/hyrax/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ module Hyrax
#
# == Valkyrie
#
# *Experimental:* Options for toggling Hyrax's experimental "Wings" valkyrie
# Options for toggling Hyrax's "Wings" valkyrie
# adapter and configuring valkyrie.
#
# @see Hyrax.config
Expand Down Expand Up @@ -617,14 +617,14 @@ def index_adapter=(adapter)
end

##
# @return [Boolean] whether to use the experimental valkyrie index
# @return [Boolean] whether to use the valkyrie index
def query_index_from_valkyrie
@query_index_from_valkyrie ||= false
end
attr_writer :query_index_from_valkyrie

##
# @return [Boolean] whether to use experimental valkyrie storage features
# @return [Boolean] whether to use valkyrie storage features
def use_valkyrie?
return @use_valkyrie unless @use_valkyrie.nil?
return true if disable_wings # always return true if wings is disabled
Expand Down Expand Up @@ -860,7 +860,7 @@ def collection_type_index_field
# @return [#constantize] a string representation of the collection
# model
def collection_model
@collection_model ||= '::Collection'
@collection_model ||= 'Hyrax::PcdmCollection'
end

##
Expand All @@ -874,7 +874,7 @@ def collection_class
# @return [#constantize] a string representation of the admin set
# model
def admin_set_model
@admin_set_model ||= 'AdminSet'
@admin_set_model ||= 'Hyrax::AdministrativeSet'
end

##
Expand Down