-
Notifications
You must be signed in to change notification settings - Fork 23
Defining a New Model and Attaching it to the Valkyrie Demo App
cam156 edited this page Sep 7, 2017
·
1 revision
Define the Model:
- It must be a Valkyrie::Resource
- It should include: title, id, a_member_of (to be part of collections)
- To allow for files & file management it must include: member_ids, viewing_direction, viewing_hint, thumbnail_id, representative_id
- Seems to be using book file manager: this may need to be extracted
Define the Controller:
- It must include Valkyrie::ControllerConcerns::ModelControllerBehavior
- It must define a resource_class
Define a ChangeSet:
- It must be a Valkyrie::ChangeSet
- It should define fields
- It must include :a_member_of (defined the field to be an array of ids which is needed for the collection membership to work)
Define views:
- Defaults are in app/views/records
- you may override in app/views/songs
Define routes:
- Copied Book Routes (removed append actions)
Add to work list:
- app/views/shared/_add_works.html.erb
Issues Found:
- Do we care that File Nodes are being displayed in the catalog search results?