This is probably a duplicate of this answer
Rails .page call on model also calls count
If what you are asking is not this, please let me know
题
While i was reading the source code of will paginate i stumped upon a :wp_count_options setting in https://github.com/mislav/will_paginate/blob/master/lib/will_paginate/active_record.rb#L150 I was trying to find usage examples for using this setting for example what is useful for ? Can someone point me to a good read about using this option with will_paginate gem ?
解决方案
This is probably a duplicate of this answer
Rails .page call on model also calls count
If what you are asking is not this, please let me know