uclibs / ucrate

Scholar@UC: University of Cincinnati's self-submission institutional repository
https://scholar.uc.edu
Other
5 stars 3 forks source link

1132/ HUT multi value input type not loading correctly #1148

Closed Janell-Huyck closed 6 months ago

Janell-Huyck commented 6 months ago

Fixes #1132

We were having problems with Scholar not recognizing the input type "as: :multi_value". Any time we were attempting to take an input with the "multi_value" format, the app would crash.

"MultiValueInput" is a custom input class created by hydra-editor and present in the version of hydra-editor we are using, 5.0.5. SimpleForm should have been using that class to handle anything with the "as: :multi_value" tags, but it wasn't.

It turns out that Scholar was not loading the input classes from hydra-editor. This PR adds the input classes of hydra-editor to the load path for Scholar, and then specifically requires the "multi_value_input" file. With this addition to the initializers, all of our work types can now successfully use the multi_value format.

(Note: change to app/indexers/hyrax/collection_indexer.rb is simply a Rubocop fix)