diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2016-07-01 21:12:49 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-01 21:12:49 -0300 |
commit | 71acc3bd0100ba2ba32b8fe529dc3ea29b629126 (patch) | |
tree | 5132309391dbf4c1757c6d1c7f933ab6056cd714 /activerecord/lib | |
parent | 173bf3506d99c0767a41d30fbe4d306201369194 (diff) | |
parent | 5d3a0b14c0439beab8e3af946dec88fddc07f896 (diff) | |
download | rails-71acc3bd0100ba2ba32b8fe529dc3ea29b629126.tar.gz rails-71acc3bd0100ba2ba32b8fe529dc3ea29b629126.tar.bz2 rails-71acc3bd0100ba2ba32b8fe529dc3ea29b629126.zip |
Merge pull request #25620 from kamipo/create_without_primary_key
Pass `pk: false` to `connection.insert` explicitly if do not have a primary key
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/relation.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation.rb b/activerecord/lib/active_record/relation.rb index 7a1552856b..93baa882ad 100644 --- a/activerecord/lib/active_record/relation.rb +++ b/activerecord/lib/active_record/relation.rb @@ -65,7 +65,7 @@ module ActiveRecord @klass.connection.insert( im, 'SQL', - primary_key, + primary_key || false, primary_key_value, nil, binds) |