Skip to content

Instantly share code, notes, and snippets.

@Marinlemaignan
Forked from jeroenr/Gemfile
Created August 17, 2020 22:16
Show Gist options
  • Select an option

  • Save Marinlemaignan/56119468c8f62679877df9c7c87b217a to your computer and use it in GitHub Desktop.

Select an option

Save Marinlemaignan/56119468c8f62679877df9c7c87b217a to your computer and use it in GitHub Desktop.
Make will_paginate generate ajax links
module ApplicationHelper
def paginate(collection, params= {})
will_paginate collection, params.merge(:renderer => RemoteLinkPaginationHelper::LinkRenderer)
end
end
source 'https://rubygems.org'
gem 'rails', '3.2.3'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
gem 'therubyracer', :platform => :ruby
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
gem 'will_paginate', '~> 3.0'
<div id="page_links">
<%= paginate @results %>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment