diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-06-10 19:49:02 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-06-10 19:49:02 -0700 |
commit | b5d82e20a8be3bf6b588f780640505d7ec12d126 (patch) | |
tree | 2f087abd1cd6d3073db00e6cd27325d25054f46d /activerecord | |
parent | f48e7676e9b70884c309d3170b7ae8867e4bd252 (diff) | |
parent | a0363e2ca69c77f420313e9bfd614a13c92ce8bb (diff) | |
download | rails-b5d82e20a8be3bf6b588f780640505d7ec12d126.tar.gz rails-b5d82e20a8be3bf6b588f780640505d7ec12d126.tar.bz2 rails-b5d82e20a8be3bf6b588f780640505d7ec12d126.zip |
Merge pull request #6698 from yahonda/address_ora_911_master
Address ORA-00911 errors because of the heading underscore.
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/relation/finder_methods.rb | 2 | ||||
-rw-r--r-- | activerecord/test/cases/finder_test.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/relation/finder_methods.rb b/activerecord/lib/active_record/relation/finder_methods.rb index 1de69fce76..c91758265b 100644 --- a/activerecord/lib/active_record/relation/finder_methods.rb +++ b/activerecord/lib/active_record/relation/finder_methods.rb @@ -176,7 +176,7 @@ module ActiveRecord 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 diff --git a/activerecord/test/cases/finder_test.rb b/activerecord/test/cases/finder_test.rb index 0914d15c5e..aa44307bc2 100644 --- a/activerecord/test/cases/finder_test.rb +++ b/activerecord/test/cases/finder_test.rb @@ -46,7 +46,7 @@ class FinderTest < ActiveRecord::TestCase 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 |