Skip to content

Instantly share code, notes, and snippets.

@jims3ne1
Created October 20, 2012 03:09
Show Gist options
  • Save jims3ne1/3921865 to your computer and use it in GitHub Desktop.
Save jims3ne1/3921865 to your computer and use it in GitHub Desktop.
controller with set_pagination after filter 2
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