Class: ActiveData::Model::Attributes::ReferenceMany
- Inherits:
-
ReferenceOne
- Object
- Base
- ReferenceOne
- ActiveData::Model::Attributes::ReferenceMany
- Defined in:
- lib/active_data/model/attributes/reference_many.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from ReferenceOne
#read, #type, #typecaster, #write
Methods inherited from Base
#came_from_default?, #came_from_user?, #initialize, #inspect_attribute, #pollute, #query, #read, #readonly?, #reflection, #reset, #typecast, #value_present?, #write, #write_value
Constructor Details
This class inherits a constructor from ActiveData::Model::Attributes::Base
Instance Method Details
#read_before_type_cast ⇒ Object
11 12 13 14 15 |
# File 'lib/active_data/model/attributes/reference_many.rb', line 11 def read_before_type_cast variable_cache(:value_before_type_cast) do Array.wrap(@value_cache) end end |
#type_casted_value ⇒ Object
5 6 7 8 9 |
# File 'lib/active_data/model/attributes/reference_many.rb', line 5 def type_casted_value variable_cache(:value) do read_before_type_cast.map { |id| typecast(id) } end end |