lightyear/shoulda-matchers — comment on commit 9d0c74e4bfc2a1abb509cc4bdc1756ffdb561b9d
File:  line 0
By pcastellazzi:

I have been hit by this problem too. I been trying a sligthly different workaround:

```ruby
next_value = @subject.class.order(scope).last.to_s.next
```

This also solve the case when next_value is already in the database. I am not sure if it's a better solution because it make validate_uniqueness_of ActiveRecord specific. I would like to hear your thoughts about this.