# Generated via
#  `rails generate hyrax:work <%= class_name %>`
class <%= class_name %> < ActiveFedora::Base
  include ::Hyrax::WorkBehavior
  # This must come after the WorkBehavior because it finalizes the metadata
  # schema (by adding accepts_nested_attributes)
  include ::Hyrax::BasicMetadata

  self.indexer = <%= class_name %>Indexer
  # Change this to restrict which works can be added as a child.
  # self.valid_child_concerns = []
  validates :title, presence: { message: 'Your work must have a title.' }

  self.human_readable_type = '<%= name.underscore.titleize %>'
end

# Generated via
#  `rails generate hyrax:work <%= class_name %>`
class <%= class_name %> < ActiveFedora::Base
  include ::Hyrax::WorkBehavior

  self.indexer = <%= class_name %>Indexer
  # Change this to restrict which works can be added as a child.
  # self.valid_child_concerns = []
  validates :title, presence: { message: 'Your work must have a title.' }

  self.human_readable_type = '<%= name.underscore.titleize %>'

  # This must be included at the end, because it finalizes the metadata
  # schema (by adding accepts_nested_attributes)
  include ::Hyrax::BasicMetadata
end

Work generator: move BasicMetadata mixin to bottom of class
Work generator: move BasicMetadata mixin to bottom of class
