Sha256: 3d7d15028f70280ee167b6f4adfc07cd628962b142af468fe118017a19e50d22

Contents?: true

Size: 427 Bytes

Versions: 9

Compression:

Stored size: 427 Bytes

Contents

module ActiveData
  module Model
    module Attributes
      class ReferenceMany < ReferenceOne
        def type_casted_value
          variable_cache(:value) do
            read_before_type_cast.map { |id| typecast(id) }
          end
        end

        def read_before_type_cast
          variable_cache(:value_before_type_cast) do
            Array.wrap(@value_cache)
          end
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
active_data-1.2.0 lib/active_data/model/attributes/reference_many.rb
active_data-1.1.7 lib/active_data/model/attributes/reference_many.rb
active_data-1.1.6 lib/active_data/model/attributes/reference_many.rb
active_data-1.1.5 lib/active_data/model/attributes/reference_many.rb
active_data-1.1.4 lib/active_data/model/attributes/reference_many.rb
active_data-1.1.3 lib/active_data/model/attributes/reference_many.rb
active_data-1.1.2 lib/active_data/model/attributes/reference_many.rb
active_data-1.1.1 lib/active_data/model/attributes/reference_many.rb
active_data-1.1.0 lib/active_data/model/attributes/reference_many.rb