Sha256: 6be470cd4bba864a65e53d59eb200a91d3405012abf49ea688c583ea77d23b78

Contents?: true

Size: 297 Bytes

Versions: 3

Compression:

Stored size: 297 Bytes

Contents

#require 'active_support/core_ext/hash/keys'

module ActiveRecordIgnoredAttributes::HasAttributeValues
  def has_attribute_values?(expected)
    self.attributes.slice(*expected.stringify_keys.keys) == expected.stringify_keys
  end
  alias_method :has_attributes_hash?, :has_attribute_values?
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
active_record_ignored_attributes-0.0.5 lib/active_record_ignored_attributes/has_attribute_values.rb
active_record_ignored_attributes-0.0.4 lib/active_record_ignored_attributes/has_attribute_values.rb
active_record_ignored_attributes-0.0.3 lib/active_record_ignored_attributes/has_attribute_values.rb