Sha256: 0aab6b50f62a2c110c76b11015e1768db9bc03dbcfab14a82d8b7a3e9d9e4185

Contents?: true

Size: 230 Bytes

Versions: 3

Compression:

Stored size: 230 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

3 entries across 3 versions & 1 rubygems

Version Path
composite_primary_keys-11.0.0.rc2 lib/composite_primary_keys/attribute_methods.rb
composite_primary_keys-8.1.0 lib/composite_primary_keys/attribute_methods.rb
composite_primary_keys-8.0.0 lib/composite_primary_keys/attribute_methods.rb