Module: Rea::AspectType::Identification
- Defined in:
- lib/rea/aspect_type/identification.rb
Defined Under Namespace
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/rea/aspect_type/identification.rb', line 5 def self.included base base.before_create do |object| base.identification_aspect.identifiers.values.each do |val| identifier = Rea::Identifier.find_by_name val.type return unless identifier object.send "#{val.name}=", identifier.generate end end end |