Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-burns committed Oct 14, 2011
2 parents 3ee5e5f + 29a1fc6 commit 21fa1f1
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,11 @@ def validate_after_scope_change
# Assume the scope is a foreign key if the field is nil
previous_value ||= 0

next_value = previous_value.next
next_value = if previous_value.respond_to?(:next)
previous_value.next
else
previous_value.to_s.next
end

@subject.send("#{scope}=", next_value)

Expand Down

0 comments on commit 21fa1f1

Please sign in to comment.