Will_paginate with mongoid (total_entries issue)
问题 When using mongoid with 'will_paginate' gem, it seems like method called 'total_entries' doesnt work which can affect perfomance 回答1: So I was using Mongoid with 'will_paginate' gem and I had this problem with 'total_entries' option, and to be more specific, I dont think it was working at all, which is not very good for perfomance in many situations... After a while I found this gem but it didnt look like 'total_entries' method was working there so here's what I did: 1) Opened mongoid