From 55385c8a39117f5c1b78fcb703f9d7ac14d97d12 Mon Sep 17 00:00:00 2001 From: Jon Moss Date: Thu, 11 Feb 2016 22:58:18 -0500 Subject: Fix issue #23625 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. --- activerecord/test/schema/postgresql_specific_schema.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'activerecord/test/schema/postgresql_specific_schema.rb') diff --git a/activerecord/test/schema/postgresql_specific_schema.rb b/activerecord/test/schema/postgresql_specific_schema.rb index 3a5d73a0ed..24713f722a 100644 --- a/activerecord/test/schema/postgresql_specific_schema.rb +++ b/activerecord/test/schema/postgresql_specific_schema.rb @@ -106,4 +106,9 @@ _SQL t.integer :big_int_data_points, limit: 8, array: true t.decimal :decimal_array_default, array: true, default: [1.23, 3.45] end + + create_table :uuid_items, force: true, id: false do |t| + t.uuid :uuid, primary_key: true + t.string :title + end end -- cgit v1.2.3