Sha256: 67d3a41f372484ef465f2040995c76ed55889fa6d6937e58ac06ec4f506f1cb3

Contents?: true

Size: 752 Bytes

Versions: 14

Compression:

Stored size: 752 Bytes

Contents

module ActiveRecord
  class AttributeSet # :nodoc:
    class Builder # :nodoc:
      silence_warnings do
        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
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
composite_primary_keys-9.0.9 lib/composite_primary_keys/attribute_set/builder.rb
composite_primary_keys-10.0.3 lib/composite_primary_keys/attribute_set/builder.rb
composite_primary_keys-10.0.2 lib/composite_primary_keys/attribute_set/builder.rb
composite_primary_keys-10.0.1 lib/composite_primary_keys/attribute_set/builder.rb
composite_primary_keys-9.0.8 lib/composite_primary_keys/attribute_set/builder.rb
composite_primary_keys-10.0.0 lib/composite_primary_keys/attribute_set/builder.rb
composite_primary_keys-9.0.7 lib/composite_primary_keys/attribute_set/builder.rb
composite_primary_keys-9.0.6 lib/composite_primary_keys/attribute_set/builder.rb
composite_primary_keys-9.0.5 lib/composite_primary_keys/attribute_set/builder.rb
composite_primary_keys-9.0.4 lib/composite_primary_keys/attribute_set/builder.rb
composite_primary_keys-9.0.2 lib/composite_primary_keys/attribute_set/builder.rb
composite_primary_keys-9.0.1 lib/composite_primary_keys/attribute_set/builder.rb
composite_primary_keys-9.0.0 lib/composite_primary_keys/attribute_set/builder.rb
composite_primary_keys-9.0.0.beta1 lib/composite_primary_keys/attribute_set/builder.rb