Module: Asset::Ownership::ChangesOwner

Included in:
AssetCreation, StateChange, TagLayout, Transfer::BetweenPlates, Transfer::BetweenPlatesBySubmission
Defined in:
app/models/asset/ownership.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object

Included in events which change ownership of plates


4
5
6
7
8
9
10
# File 'app/models/asset/ownership.rb', line 4

def self.included(base)
  base.class_eval do
    extend ClassMethods
    after_create :assign_owner
    has_many :owners, as: :eventable
  end
end