/ Published in: Rails
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
def list @page_title ='List books' # Good job! sort_by = params[:sort_by] @book_pages, @books = paginate :books, :order => sort_by, :per_page => 10 end