Sha256: 239790c3fffd6d4078a909cf9c4c3317750b3fd02cf334b11796807b159bf7ab

Contents?: true

Size: 528 Bytes

Versions: 13

Compression:

Stored size: 528 Bytes

Contents

module Curate::UserBehavior::Delegates
  extend ActiveSupport::Concern
  included do
    has_many :deposit_rights_given, foreign_key: 'grantor_id', class_name: 'Curate::ProxyDepositRights', dependent: :destroy
    has_many :can_receive_deposits_from, through: :deposit_rights_given, source: :grantee

    has_many :deposit_rights_received, foreign_key: 'grantee_id', class_name: 'Curate::ProxyDepositRights', dependent: :destroy
    has_many :can_make_deposits_for, through: :deposit_rights_received, source: :grantor
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
curate-0.6.6 app/models/curate/user_behavior/delegates.rb
curate-0.6.5 app/models/curate/user_behavior/delegates.rb
curate-0.6.4 app/models/curate/user_behavior/delegates.rb
curate-0.6.3 app/models/curate/user_behavior/delegates.rb
curate-0.6.1 app/models/curate/user_behavior/delegates.rb
curate-0.6.0 app/models/curate/user_behavior/delegates.rb
curate-0.5.6 app/models/curate/user_behavior/delegates.rb
curate-0.5.5 app/models/curate/user_behavior/delegates.rb
curate-0.5.4 app/models/curate/user_behavior/delegates.rb
curate-0.5.2 app/models/curate/user_behavior/delegates.rb
curate-0.5.1 app/models/curate/user_behavior/delegates.rb
curate-0.5.0 app/models/curate/user_behavior/delegates.rb
curate-0.4.2 app/models/curate/user_behavior/delegates.rb