File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
lib/active_record/relation Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -176,7 +176,7 @@ def exists?(id = false)
176
176
177
177
join_dependency = construct_join_dependency_for_association_find
178
178
relation = construct_relation_for_association_find ( join_dependency )
179
- relation = relation . except ( :select , :order ) . select ( "1 AS _one " ) . limit ( 1 )
179
+ relation = relation . except ( :select , :order ) . select ( "1 AS one " ) . limit ( 1 )
180
180
181
181
case id
182
182
when Array , Hash
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ def test_exists
46
46
end
47
47
48
48
def test_exists_does_not_select_columns_without_alias
49
- assert_sql ( /SELECT\W +1 AS _one FROM ["`]topics["`]\W +LIMIT 1/ ) do
49
+ assert_sql ( /SELECT\W +1 AS one FROM ["`]topics["`]/i ) do
50
50
Topic . exists?
51
51
end
52
52
end
You can’t perform that action at this time.
0 commit comments