Posted By

winson on 04/30/07


Tagged

list textmate controller book


Versions (?)

Who likes this?

5 people have marked this snippet as a favorite

bordalix
stainless
exscape
sergeizen
webstic


Paginate with sort by


 / Published in: Rails
 

  1. def list
  2. @page_title ='List books'
  3. # Good job!
  4. sort_by = params[:sort_by]
  5. @book_pages, @books = paginate :books, :order => sort_by, :per_page => 10
  6. end

Report this snippet  

You need to login to post a comment.