Want to show the records satisfying some condition after retrieving it from the database in Ruby on rails.
Problem is that :
currently I am showing the records using will_paginate gem without checking the condition after retrieving it from database.
and if I check the condition ; some records fail to meet the condition will be eliminated
EDIT
@result=MyRecord.paginate(:per_page => @perpage, :page => params[:page]).all
#process records for conditions, if i eliminate records from @result that much records will be less for pagination
@result #modified sent to view
So how to show the pagination for this.
Is their any alternative way to do the pagination after retrieving the records???