Module: Hyrax::ProxyDeposit

Extended by:
ActiveSupport::Concern
Included in:
WorkBehavior
Defined in:
app/models/concerns/hyrax/proxy_deposit.rb

Instance Method Summary collapse

Instance Method Details

#request_transfer_to(target) ⇒ Object

Raises:

  • (ArgumentError)


17
18
19
20
21
# File 'app/models/concerns/hyrax/proxy_deposit.rb', line 17

def request_transfer_to(target)
  raise ArgumentError, "Must provide a target" unless target
  deposit_user = ::User.find_by_user_key(depositor)
  ProxyDepositRequest.create!(work_id: id, receiving_user: target, sending_user: deposit_user)
end