Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Address ORA-00911 errors because of the heading underscore.

  • Loading branch information...
commit a0363e2ca69c77f420313e9bfd614a13c92ce8bb 1 parent f48e767
@yahonda yahonda authored
View
2  activerecord/lib/active_record/relation/finder_methods.rb
@@ -176,7 +176,7 @@ def exists?(id = false)
join_dependency = construct_join_dependency_for_association_find
relation = construct_relation_for_association_find(join_dependency)
- relation = relation.except(:select, :order).select("1 AS _one").limit(1)
+ relation = relation.except(:select, :order).select("1 AS one").limit(1)
case id
when Array, Hash
View
2  activerecord/test/cases/finder_test.rb
@@ -46,7 +46,7 @@ def test_exists
end
def test_exists_does_not_select_columns_without_alias
- assert_sql(/SELECT\W+1 AS _one FROM ["`]topics["`]\W+LIMIT 1/) do
+ assert_sql(/SELECT\W+1 AS one FROM ["`]topics["`]/i) do
Topic.exists?
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.