Skip to content

Instantly share code, notes, and snippets.

@jayanthdeejay
Forked from jcoyne/works.rb
Created January 19, 2020 03:53
Show Gist options
  • Save jayanthdeejay/ecb85ba9202a3ce02a1a12c38cf20140 to your computer and use it in GitHub Desktop.
Save jayanthdeejay/ecb85ba9202a3ce02a1a12c38cf20140 to your computer and use it in GitHub Desktop.
class Book < ActiveFedora::Base
include Hydra::Works::Work
end
class Page < ActiveFedora::Base
include Hydra::Works::Work
end
book = Book.new
page = Page.new
cover_image = GenericFile.new
book.child_works << page
page.generic_files << cover_image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment