Skip to content

Commit 7f662e7

Browse files
authored
Updated for Rails v7.1.0.rc2 (#1102)
1 parent 32632b9 commit 7f662e7

File tree

4 files changed

+4
-30
lines changed

4 files changed

+4
-30
lines changed

‎VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.1.0.beta1
1+
7.1.0.rc2

‎activerecord-sqlserver-adapter.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ Gem::Specification.new do |spec|
2727
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
2828
spec.require_paths = ["lib"]
2929

30-
spec.add_dependency "activerecord", "~> 7.1.0.beta1"
30+
spec.add_dependency "activerecord", "~> 7.1.0.rc2"
3131
spec.add_dependency "tiny_tds"
3232
end

‎lib/active_record/connection_adapters/sqlserver/database_statements.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,8 @@ def sql_for_insert(sql, pk, binds, _returning)
308308
else
309309
"#{sql}; SELECT CAST(SCOPE_IDENTITY() AS bigint) AS Ident"
310310
end
311-
super
311+
312+
[sql, binds]
312313
end
313314

314315
# === SQLServer Specific ======================================== #

‎test/cases/coerced_tests.rb

-27
Original file line numberDiff line numberDiff line change
@@ -2390,30 +2390,6 @@ def test_insert_all_returns_requested_sql_fields_coerced
23902390
result = Book.insert_all! [{ name: "Rework", author_id: 1 }], returning: Arel.sql("UPPER(INSERTED.name) as name")
23912391
assert_equal %w[ REWORK ], result.pluck("name")
23922392
end
2393-
2394-
# SQL Server does not support upsert. Coerce can be removed after https://github.com/rails/rails/pull/49344
2395-
coerce_tests! :test_insert_all_should_handle_empty_arrays
2396-
def test_insert_all_should_handle_empty_arrays_coerced
2397-
assert_raises(ArgumentError, /does not support upsert/) do
2398-
original_test_insert_all_should_handle_empty_arrays
2399-
end
2400-
end
2401-
2402-
# SQL Server does not support upsert. Coerce can be removed after https://github.com/rails/rails/pull/49344
2403-
coerce_tests! :test_insert_all_and_upsert_all_with_aliased_attributes
2404-
def test_insert_all_and_upsert_all_with_aliased_attributes_coerced
2405-
assert_raises(ArgumentError, /does not support upsert/) do
2406-
original_test_insert_all_and_upsert_all_with_aliased_attributes
2407-
end
2408-
end
2409-
2410-
# SQL Server does not support upsert. Coerce can be removed after https://github.com/rails/rails/pull/49344
2411-
coerce_tests! :test_insert_all_and_upsert_all_with_sti
2412-
def test_insert_all_and_upsert_all_with_sti_coerced
2413-
assert_raises(ArgumentError, /does not support upsert/) do
2414-
original_test_insert_all_and_upsert_all_with_sti
2415-
end
2416-
end
24172393
end
24182394

24192395
class HasOneThroughDisableJoinsAssociationsTest < ActiveRecord::TestCase
@@ -2445,9 +2421,6 @@ class ActiveRecord::Encryption::EncryptableRecordTest < ActiveRecord::Encryption
24452421
author = EncryptedAuthor.create(name: "a" * 4001)
24462422
assert_not author.valid?
24472423
end
2448-
2449-
# SQL Server does not support upsert. Coerce can be removed after https://github.com/rails/rails/pull/49344
2450-
coerce_tests! %r{loading records with encrypted attributes defined on columns with default values}
24512424
end
24522425

24532426
module ActiveRecord

0 commit comments

Comments
 (0)