Sha256: a289d0c21f3cf831375b4a9e53fc90273e58b9370f53099573e052848ced0781

Contents?: true

Size: 228 Bytes

Versions: 6

Compression:

Stored size: 228 Bytes

Contents

module ActiveRecord
  module AttributeMethods
    def has_attribute?(attr_name)
      # CPK
      # attributes.key?(attr_name)
      Array(attr_name).all? {|single_attr| attributes.key?(single_attr) }
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
composite_primary_keys-12.0.0 lib/composite_primary_keys/attribute_methods.rb
composite_primary_keys-12.0.0.rc5 lib/composite_primary_keys/attribute_methods.rb
composite_primary_keys-12.0.0.rc4 lib/composite_primary_keys/attribute_methods.rb
composite_primary_keys-12.0.0.rc3 lib/composite_primary_keys/attribute_methods.rb
composite_primary_keys-12.0.0.rc2 lib/composite_primary_keys/attribute_methods.rb
composite_primary_keys-12.0.0.rc1 lib/composite_primary_keys/attribute_methods.rb