Created
October 20, 2012 02:42
-
-
Save jims3ne1/3921764 to your computer and use it in GitHub Desktop.
controller with set_pagination after filter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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