Class: Unidom::Standard::StandardAssociating

Inherits:
ApplicationRecord show all
Includes:
Common::Concerns::ModelExtension
Defined in:
app/models/unidom/standard/standard_associating.rb

Overview

Standard Association 是标准之间的关联关系。association_code: REVS 修订,RFRC 引用。

Class Method Summary collapse

Class Method Details

.associate!(source, with: target, due_to: 'REVS', at: Time.now) ⇒ Object



17
18
19
# File 'app/models/unidom/standard/standard_associating.rb', line 17

def self.associate!(source, with: target, due_to: 'REVS', at: Time.now)
  create! source_id: to_id(source), target_id: to_id(with), association_code: due_to, opened_at: at
end