Method: ActiveData::Model::Attributes::Reflections::Base#build_attribute
- Defined in:
- lib/active_data/model/attributes/reflections/base.rb
#build_attribute(owner, raw_value = ActiveData::UNDEFINED) ⇒ Object
27 28 29 30 31 |
# File 'lib/active_data/model/attributes/reflections/base.rb', line 27 def build_attribute(owner, raw_value = ActiveData::UNDEFINED) attribute = self.class.attribute_class.new(name, owner) attribute.write_value(raw_value, origin: :persistence) unless raw_value == ActiveData::UNDEFINED attribute end |