Skip to content

Instantly share code, notes, and snippets.

@thadd
Created July 17, 2012 18:02
Show Gist options
  • Save thadd/3130872 to your computer and use it in GitHub Desktop.
Save thadd/3130872 to your computer and use it in GitHub Desktop.
Update for paginate liquid drop in Locomotive Editor
pagination = {}
pagination['collection'] = collection.send(:paginate, {
:page => context['current_page'],
:per_page => @per_page })
pagination['current_page'] = pagination['collection'].current_page
pagination['per_page'] = pagination['collection'].per_page
pagination['total_entries'] = pagination['collection'].total_entries
pagination['next_page'] = pagination['collection'].next_page
pagination['previous_page'] = pagination['collection'].previous_page
pagination['total_pages'] = pagination['collection'].total_pages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment