Sha256: bdb4b488cd486db312882a12b9c3154cd5756315183fb8a89c86ec0410fd8d48

Contents?: true

Size: 696 Bytes

Versions: 8

Compression:

Stored size: 696 Bytes

Contents

module ActiveRecord
  class AttributeSet # :nodoc:
    class Builder # :nodoc:
      def build_from_database(values = {}, additional_types = {})
        # CPK
        # if always_initialized && !values.key?(always_initialized)
        #   values[always_initialized] = nil
        # end
        Array(always_initialized).each do |always_initialized_attribute|
          if always_initialized_attribute && !values.key?(always_initialized_attribute)
            values[always_initialized_attribute] = nil
          end
        end
        
        attributes = LazyAttributeHash.new(types, values, additional_types)
        AttributeSet.new(attributes)
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
composite_primary_keys-8.1.8 lib/composite_primary_keys/attribute_set/builder.rb
composite_primary_keys-8.1.7 lib/composite_primary_keys/attribute_set/builder.rb
composite_primary_keys-8.1.6 lib/composite_primary_keys/attribute_set/builder.rb
composite_primary_keys-8.1.5 lib/composite_primary_keys/attribute_set/builder.rb
composite_primary_keys-8.1.4 lib/composite_primary_keys/attribute_set/builder.rb
composite_primary_keys-8.1.3 lib/composite_primary_keys/attribute_set/builder.rb
composite_primary_keys-8.1.2 lib/composite_primary_keys/attribute_set/builder.rb
composite_primary_keys-8.1.1 lib/composite_primary_keys/attribute_set/builder.rb