mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
use arel to construct AST rather than generate strings
This commit is contained in:
@@ -83,8 +83,9 @@ module ActiveRecord
|
||||
super.merge(
|
||||
:joins => construct_joins,
|
||||
:readonly => ambiguous_select?(@reflection.options[:select]),
|
||||
:select => @reflection.options[:select] ||
|
||||
Arel.sql("#{@reflection.quoted_table_name}.*, #{@owner.connection.quote_table_name @reflection.options[:join_table]}.*")
|
||||
:select => @reflection.options[:select] || [
|
||||
@reflection.klass.arel_table[Arel.star],
|
||||
join_table[Arel.star]]
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user