search for: school_pages

Displaying 1 result from an estimated 1 matches for "school_pages".

2007 Jan 06
3
speeding up pagination
...help to optimize a query (sort of ...) if params[:debit] == "on" @schools = School.find(:all, :conditions => ["name like ?", "%#{params[:search]}%"], :order => ''name'') @schools.delete_if { |s| s.debit <= 0 } @school_pages = Paginator.new self, @schools.length, 20 The problem here is that instance.debit is a virtual attribute ... Any clue ? ngw --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group....