will_paginate reporting too many entries and pages

前端 未结 2 794
死守一世寂寞
死守一世寂寞 2021-01-05 14:59

I\'m using will_paginate to display data returned from a query that includes both a joins and a select statement. When I paginate the data the number of entries is equal to

2条回答
  •  生来不讨喜
    2021-01-05 15:44

    Assuming that your Sale model has_many :line_items, by joining you're going to get a 'sales' entry for every related 'line_item'.

提交回复
热议问题