Module: Hyrax::DepositAgreementBehavior

Included in:
Forms::FileSetForm, Forms::PcdmObjectForm, Forms::ResourceBatchEditForm
Defined in:
app/forms/concerns/hyrax/deposit_agreement_behavior.rb

Overview

A module of form behaviours for depositors and depositor agreements.

Class Method Summary collapse

Class Method Details

.included(descendant) ⇒ Object



6
7
8
9
10
# File 'app/forms/concerns/hyrax/deposit_agreement_behavior.rb', line 6

def self.included(descendant)
  descendant.property :depositor

  descendant.property :agreement_accepted, virtual: true, default: false, prepopulator: proc { |_opts| self.agreement_accepted = !model.new_record }
end