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?
Please help me.

Thanks in advance

On 23 Jul 2009, at 12:20, Indu RS wrote:

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.

Fred