Sha256: b18965c4186f57ee08b068e0b0321dc0c24bf09ef1190546ab90540e2d1c399e

Contents?: true

Size: 239 Bytes

Versions: 20

Compression:

Stored size: 239 Bytes

Contents

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

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
composite_primary_keys-11.3.1 lib/composite_primary_keys/attribute_methods.rb
composite_primary_keys-8.1.8 lib/composite_primary_keys/attribute_methods.rb
composite_primary_keys-8.1.7 lib/composite_primary_keys/attribute_methods.rb
composite_primary_keys-11.2.0 lib/composite_primary_keys/attribute_methods.rb
composite_primary_keys-11.1.0 lib/composite_primary_keys/attribute_methods.rb
composite_primary_keys-11.0.3 lib/composite_primary_keys/attribute_methods.rb
composite_primary_keys-11.0.2 lib/composite_primary_keys/attribute_methods.rb
composite_primary_keys-11.0.1 lib/composite_primary_keys/attribute_methods.rb
composite_primary_keys-11.0.0 lib/composite_primary_keys/attribute_methods.rb
composite_primary_keys-11.0.0.rc1 lib/composite_primary_keys/attribute_methods.rb
composite_primary_keys-11.0.0.beta4 lib/composite_primary_keys/attribute_methods.rb
composite_primary_keys-11.0.0.beta3 lib/composite_primary_keys/attribute_methods.rb
composite_primary_keys-11.0.0.beta2 lib/composite_primary_keys/attribute_methods.rb
composite_primary_keys-11.0.0.beta1 lib/composite_primary_keys/attribute_methods.rb
composite_primary_keys-8.1.6 lib/composite_primary_keys/attribute_methods.rb
composite_primary_keys-8.1.5 lib/composite_primary_keys/attribute_methods.rb
composite_primary_keys-8.1.4 lib/composite_primary_keys/attribute_methods.rb
composite_primary_keys-8.1.3 lib/composite_primary_keys/attribute_methods.rb
composite_primary_keys-8.1.2 lib/composite_primary_keys/attribute_methods.rb
composite_primary_keys-8.1.1 lib/composite_primary_keys/attribute_methods.rb