Guest User

Untitled

a guest
Feb 19th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. # or, we can specify eager caching in the action itself
  2. def index(page = 1)
  3. unless page == 1
  4. eager_cache :index do |controller|
  5. controller.params[:page] = page + 1
  6. end
  7. end
  8.  
  9. display Acticle.paginate(:page => page)
  10. end
Add Comment
Please, Sign In to add comment