diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-05-07 10:39:41 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-05-07 10:39:41 -0700 |
commit | 2b5e4f7f983a891bfcf288fba386cc534e64223e (patch) | |
tree | 9775eea8e9449e3fbd5b79051c00c97830c68760 /activerecord/lib | |
parent | 3043d45eefc3776d5f3a9e7d212a01f99d869ef8 (diff) | |
download | rails-2b5e4f7f983a891bfcf288fba386cc534e64223e.tar.gz rails-2b5e4f7f983a891bfcf288fba386cc534e64223e.tar.bz2 rails-2b5e4f7f983a891bfcf288fba386cc534e64223e.zip |
Revert "Merge pull request #10455 from patricksrobertson/bigserial_id_not_identifying_pk"
This reverts commit 3043d45eefc3776d5f3a9e7d212a01f99d869ef8, reversing
changes made to ca0275d36b395631725c4583db5a45c06443fdb9.
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb index 2d0eef6c84..88b09e7999 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -359,12 +359,8 @@ module ActiveRecord # a record (as primary keys cannot be +nil+). This might be done via the # +SecureRandom.uuid+ method and a +before_save+ callback, for instance. def primary_key(name, type = :primary_key, options = {}) - return super unless type = :primary_key - - if type == :uuid - options[:default] = options.fetch(:default, 'uuid_generate_v4()') - end - + return super unless type == :uuid + options[:default] = options.fetch(:default, 'uuid_generate_v4()') options[:primary_key] = true column name, type, options end |