如何在Ruby On Rails 3中为表MySQL表设置别名?
|
如何在Ruby On Rails 3中为MySQL表设置别名?
data = TUP.all :select =>
\"DATE(tup.created_at) as date
, ROUND(SUM(fo_count)/#{authors_count}) AS followers\"
,:joins => \"INNER JOIN tlsts AS tl ON tl.user_id = tup.user_id\"
,:conditions => condition
我的意思是:在哪里可以在此代码中为表TwitterUserProfile设置别名tup?
对于什么参数:from =>?
没有找到相关结果
已邀请:
1 个回复
坝胺绣敝
。例如: