mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
55385c8a39
This resolves a bug where if the primary key used is not `id` (ex: `uuid`), and has a `validates_uniqueness_of` in the model, a uniqueness error would be raised. This is a partial revert of commit `119b9181ece399c67213543fb5227b82688b536f`, which introduced this behavior.
6 lines
113 B
Ruby
6 lines
113 B
Ruby
class UuidItem < ActiveRecord::Base
|
|
end
|
|
|
|
class UuidValidatingItem < UuidItem
|
|
validates_uniqueness_of :uuid
|
|
end
|