Permalink
Browse files

Use the variable that we set.

  • Loading branch information...
Gabe Berke-Williams
Gabe Berke-Williams committed Jun 22, 2012
1 parent b618275 commit 5ff9cd1f51ae05f62c1bdc26383d0df8af636dac
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/shoulda/matchers/active_model/validate_uniqueness_of_matcher.rb
@@ -95,7 +95,7 @@ def set_scoped_attributes
@options[:scopes].all? do |scope|
setter = :"#{scope}="
if @subject.respond_to?(setter)
@subject.send("#{scope}=", existing.send(scope))
@subject.send(setter, existing.send(scope))
true
else
@failure_message = "#{class_name} doesn't seem to have a #{scope} attribute."

0 comments on commit 5ff9cd1

Please sign in to comment.