How can I paginate records find by using find_by_sql

Hello everyone,

I forced to use @user = User.find_by_sql sql_query in a particular situation in my project. Now I want to paginate the records. How can I paginate the records?

will_paginate etc. can help you with the view helpers on stuff but it
will be up to you to modify the sql you generate to get the correct
range of records.