Skip to content

Commit

Permalink
use an attribute rather than a SQL literal
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed Feb 27, 2011
1 parent 54a2bf6 commit f3e9cbc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion activerecord/lib/active_record/relation/query_methods.rb
Expand Up @@ -284,7 +284,7 @@ def build_select(arel, selects)
@implicit_readonly = false
arel.project(*selects)
else
arel.project(Arel.sql(@klass.quoted_table_name + '.*'))
arel.project(@klass.arel_table[Arel.star])
end
end

Expand Down
1 change: 1 addition & 0 deletions activerecord/test/cases/base_test.rb
Expand Up @@ -134,6 +134,7 @@ def test_use_table_engine_for_quoting_where
fakepool = Class.new(Struct.new(:spec)) {
def with_connection; yield self; end
def connection_pool; self; end
def table_exists?(name); false; end
def quote_table_name(*args); raise "lol quote_table_name"; end
}

Expand Down

0 comments on commit f3e9cbc

Please sign in to comment.