Skip to content

Instantly share code, notes, and snippets.

@benburkert
Created August 11, 2008 03:05
Show Gist options
  • Save benburkert/4798 to your computer and use it in GitHub Desktop.
Save benburkert/4798 to your computer and use it in GitHub Desktop.
# or, we can specify eager caching in the action itself
def index(page = 1)
unless page == 1
eager_cache :index do |controller|
controller.params[:page] = page + 1
end
end
display Acticle.paginate(:page => page)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment