The stiffness of will_paginate is broken in my version of Oracle. By default, the paginate_by_sql method in the WillPaginate module inserts an extra "AS" into the request and causes it to fail.
The code itself is easy to commit, but I'm not sure Rails will be able to get my changes.
I do not want to change the code in the stone itself, as this will leave my code broken on other machines.
I tried to create a lib / test.rb file containing:
module WillPaginate def paginate_by_sql (my code goes here) end end
and demanding it from environment.rb, but it doesn't pick my changes. I also tried to require it from the /application.rb controllers, but again, without raising my changes.
Temporarily, I got it to work by overriding the method inside the specific model itself, but itβs a little hack and means that I canβt use it on any of the other models in this project.
I'm sure there is an easy way to do this, but I have not been able to track it using Google.
ruby ruby-on-rails gem will-paginate
Dave Smylie Feb 24 '09 at 3:04 2009-02-24 03:04
source share