Skip to content

Instantly share code, notes, and snippets.

@developer88
Created January 16, 2013 12:21
Show Gist options
  • Save developer88/4546780 to your computer and use it in GitHub Desktop.
Save developer88/4546780 to your computer and use it in GitHub Desktop.
Fix problem with Pagination's Gem for Rails and Draper and Kaminari gem
# This is a dirty hack to fix Draper problem with kaminari
# Put this in app/decorators/collection_decorator.rb
class Draper::CollectionDecorator
delegate :current_page, :total_pages, :limit_value
def total_count
source.total_count
end
end
@MaksimAbramchuk
Copy link

@snow, +1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment