阅读背景:

如何在Rails活动记录查询中执行条件计数?

来源:互联网 

In a Rails 3.2 app I'm trying to construct a query that will return an array with two calculated counts. The app has three models: a User has many Events, and a Location has many Events. I need to return an array for a user that contains the number of events they have at each location, as well as the number of active events. In a Rails 3.2 app I'm trying to construct a qu




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: