ruby on rails - ActiveRecord customize "AS" identifier -


some rails code like:

@result = table_one.join(table_two, table_three). where(id = '1'). group(:val1, :val2, :amount). sum(:amount) 

will execute sql like:

select sum(table_one.amount) table_one_amount, table_one.val1 table_one_val1 .... 

just wondering if there way customize rule of "as", can sql like

select sum(table_one.amount) t1_a, table_one.val1 t1_v1 .... 


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -