Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
paginate_by_sql fails when using different databases #117
My rails application, on my development environment, runs on SQLite, but access some legacy Oracle database (using ActiveRecord::Base.establish_connection on the legacy models).
Since it's a legacy database, used mostly for querying, I use
Digging through the logs, I noticed that will_paginate added 'LIMIT 20 OFFSET 20' to my query - the SQLite way of pagination. Looks like it's trying to use the adapter configured for ActiveRecord::Base, and not for my additional model.