Created
October 20, 2012 03:09
-
-
Save jims3ne1/3921865 to your computer and use it in GitHub Desktop.
controller with set_pagination after filter 2
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::MoviesController < Api::BaseController | |
after_filter :only => [:index] {set_pagination(:movies)} | |
def index | |
@movies = Movie.page params[:page] | |
end | |
def show | |
@movie = Movie.find params[:id] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment