hyrax icon indicating copy to clipboard operation
hyrax copied to clipboard

App generated through template includes file_set model that is an AF::Base model

Open elrayle opened this issue 4 years ago • 0 comments

Descriptive summary

The generated app/model/file_set.rb extends ActiveFedora::Base. To move to Valkyrie, the generated file set model needs to be_a Hyrax::Resource.

It is unclear if the generated file set is needed. Is there a reason not to just use Hyrax::FileSet?

Rationale

All models should be_a Hyrax::Resource to work with Valkyrie persistence.

Expected behavior

Generating a new Hyrax app using template.rb creates FileSet < Hyrax::FileSet in the new app's app/models/file_set.rb.

QUESTION:

It is unclear if the generated file set is needed. Is there a reason not to just use Hyrax::FileSet?

Actual behavior

Generating a new Hyrax app using template.rb creates FileSet < ActiveFedora::Base in the new app's app/models/file_set.rb.

Steps to reproduce the behavior

  1. Generate a new Hyrax app using...
rails _5.2.6_ new my_hyrax -m https://raw.githubusercontent.com/samvera/hyrax/v3.1.0/template.rb

NOTE: May need to adjust the tag from v3.1.0 to the latest version tag for Hyrax.

Related Work

Issue #5099 App generated through template includes collection model that is an AF::Base model Issue #5100 App generated by template includes .fcrepo_wrapper for connecting to Fedora

elrayle avatar Sep 10 '21 21:09 elrayle