You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I monkey-patched the gem and changed the paginate_by_sql to add 1 to the offset
defpaginate_by_sql(sql,options)
...
iforacle# Changed the offset adding 1query=<<-SQL SELECT * FROM ( SELECT rownum rnum, a.* FROM (#{query}) a WHERE rownum <= #{pager.offset + pager.per_page} ) WHERE rnum >= #{pager.offset+1} SQLelse
...
end
...
end
instead of
defpaginate_by_sql(sql,options)
...
iforaclequery=<<-SQL SELECT * FROM ( SELECT rownum rnum, a.* FROM (#{query}) a WHERE rownum <= #{pager.offset + pager.per_page} ) WHERE rnum >= #{pager.offset} SQLelse
...
end
...
end
With per_page set to 10; First page will retrieve 1
10, Second page will retrieve 1020 (instead of 11 to 20).This results in repeating edge rows between pages.
Rails 3.2.0
will_paginate 3.0.3
activerecord-oracle_enhanced-adapter 1.4.0
The text was updated successfully, but these errors were encountered: