Skip to content

Instantly share code, notes, and snippets.

@TXDynamics
Created August 13, 2013 14:57
Show Gist options
  • Save TXDynamics/6222027 to your computer and use it in GitHub Desktop.
Save TXDynamics/6222027 to your computer and use it in GitHub Desktop.
Controller Code for the Kaminari pagination gem
# In this example we are populating the index method with all records
# you do not use the all method when combining with the page method of kaminari
@funds = ProductCache.page(params[:page]).per(50)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment