Skip to content

Instantly share code, notes, and snippets.

@mark-dce
Created November 12, 2021 21:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mark-dce/f6013a07690db9767e39878ae8b1d0dc to your computer and use it in GitHub Desktop.
Save mark-dce/f6013a07690db9767e39878ae8b1d0dc to your computer and use it in GitHub Desktop.
New Work Creation (Abridged)
stack = Hyrax::CurationConcern.actor
curation_concern = Work.new
user = User.where(email: 'mark@curationexperts.com').first
attributes = {:title=>["Testing Actor Stack"], :rights_statement=>["http://rightsstatements.org/vocab/UND/1.0/"], :creator=>["Me"]}
env = Hyrax::Actors::Environment.new(curation_concern, user.ability, attributes)
stack.create(env)
@mark-dce
Copy link
Author

This seems to work too... the actor stack is doing some additional things, but not clear which (e.g. badges, workflow, ???)

Work.create(:title=>["Testing Actor Stack"], :rights_statement=>["http://rightsstatements.org/vocab/UND/1.0/"], :creator=>["Me"])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment