Use the variable that we set.

This commit is contained in:
Gabe Berke-Williams 2012-06-22 09:58:25 -04:00
parent b618275a9d
commit 5ff9cd1f51
1 changed files with 1 additions and 1 deletions

View File

@ -95,7 +95,7 @@ module Shoulda # :nodoc:
@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."