Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Revert "Feature: Use attributes instead of the record when comparing"

This reverts commit 83dd523.
  • Loading branch information...
commit bca0e85f9f43d0a605ad5bb9d3a556d6d3a8997c 1 parent df187cc
Gary Rennie Gazler authored

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. +1 1  lib/uniqueable/validates_uniqueable.rb
2  lib/uniqueable/validates_uniqueable.rb
@@ -25,7 +25,7 @@ def validate_each(record, attribute, value)
25 25
26 26 unless result.empty?
27 27 #Check that the result isn't the record we are validating
28   - unless result.first.attributes.except(:updated_at) == record.attributes.except(:updated_at)
  28 + unless result.first == record
29 29 return record.errors.add(attribute, :taken)
30 30 end
31 31 end

0 comments on commit bca0e85

Please sign in to comment.
Something went wrong with that request. Please try again.