Sha256: b346d6ab6b595d303343600f47b684ca3bc8c36a92c309b71c0223d11abf14ea

Contents?: true

Size: 239 Bytes

Versions: 2

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

2 entries across 2 versions & 1 rubygems

Version Path
composite_primary_keys-12.0.2 lib/composite_primary_keys/attribute_methods.rb
composite_primary_keys-12.0.1 lib/composite_primary_keys/attribute_methods.rb