Skip to content

Instantly share code, notes, and snippets.

@romul
Created January 27, 2012 08:12
Show Gist options
  • Save romul/1687744 to your computer and use it in GitHub Desktop.
Save romul/1687744 to your computer and use it in GitHub Desktop.
The way to use Kaminari with Cell (or with Apotomo)
# 1) Run rails g kaminari:views default to generate copy of kaminari views inside your app
# 2) Override Kaminari::Helpers::Tag#to_s as shown here:
module Kaminari
module Helpers
class Tag
def to_s(locals = {}) #:nodoc:
@template.render :partial => "../views/kaminari/#{@theme}#{self.class.name.demodulize.underscore}", :locals => @options.merge(locals)
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment