mirror of https://github.com/rails/rails
Merge pull request #50859 from rails/no-row-mutation
Don't mutate row arrays that come back from the database adapter
This commit is contained in:
commit
80bce4aad3
|
@ -1614,9 +1614,9 @@ class FinderTest < ActiveRecord::TestCase
|
|||
[["1", "1", nil, "37signals"],
|
||||
["2", "1", "2", "Summit"],
|
||||
["3", "1", "1", "Microsoft"]],
|
||||
Company.connection.select_rows("SELECT id, firm_id, client_of, name FROM companies WHERE id IN (1,2,3) ORDER BY id").map! { |i| i.map! { |j| j.to_s unless j.nil? } })
|
||||
Company.connection.select_rows("SELECT id, firm_id, client_of, name FROM companies WHERE id IN (1,2,3) ORDER BY id").map { |i| i.map { |j| j.to_s unless j.nil? } })
|
||||
assert_equal [["1", "37signals"], ["2", "Summit"], ["3", "Microsoft"]],
|
||||
Company.connection.select_rows("SELECT id, name FROM companies WHERE id IN (1,2,3) ORDER BY id").map! { |i| i.map! { |j| j.to_s unless j.nil? } }
|
||||
Company.connection.select_rows("SELECT id, name FROM companies WHERE id IN (1,2,3) ORDER BY id").map { |i| i.map { |j| j.to_s unless j.nil? } }
|
||||
end
|
||||
|
||||
def test_find_with_order_on_included_associations_with_construct_finder_sql_for_association_limiting_and_is_distinct
|
||||
|
|
Loading…
Reference in New Issue