阅读背景:

Rails:阻止will_paginate调用ActiveRelation的#count

来源:互联网 

When I pass will_paginate an ActiveRelation, it always calls its #count method and hits the database to find out the total number of items. But this operation takes time and I have the total number already cached and ready. Can I pass this pre-calculated count to an ActiveRelation, it




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

分享到: