Skip to content

Instantly share code, notes, and snippets.

@PeteMichaud
Created July 19, 2013 17:08
Show Gist options
  • Save PeteMichaud/6040771 to your computer and use it in GitHub Desktop.
Save PeteMichaud/6040771 to your computer and use it in GitHub Desktop.
Getting Draper and Kaminari to play nice together isn't straightforward. Add this file to the config/initializers/extensions/ path and it'll stop the errors about the DraperCollection not having various methods.
module Draper
class CollectionDecorator
delegate :current_page, :total_pages, :limit_value, :model_name, :total_count, :offset_value, :last_page?
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment