Skip to content

Instantly share code, notes, and snippets.

@jims3ne1
Created October 20, 2012 02:42
Show Gist options
  • Save jims3ne1/3921764 to your computer and use it in GitHub Desktop.
Save jims3ne1/3921764 to your computer and use it in GitHub Desktop.
controller with set_pagination after filter
class Api::V2::BooksController < Api::BaseController
after_filter :only => [:index] {set_pagination(:books)}
def index
@books = Book.page params[:page]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment