Skip to content

Instantly share code, notes, and snippets.

@azizmb
azizmb / bootstrap_helper.rb
Created April 24, 2012 16:18 — forked from thatfunkymunki/application_helper.rb
Make will_paginate generate HTML that bootstrap.less will render nicely, fixed for will_paginate 3.0.2
def bootstrap_paginate(pages, options={})
options.reverse_merge!(
:class => 'pagination',
:renderer => BootstrapLinkRenderer,
:previous_label => '←'.html_safe,
:next_label => '→'.html_safe
)
will_paginate(pages, options)
end
Some brief instructions on how to use Sprocket 2 in Rails to get CoffeeScript
powered JS and SASS powered CSS with YUI compression all via the magic of rack.
This stuff will be native in Rails 3.1 and the layout of the files on the
filesystem will be different but this guide will get you working with it
while we wait for all that to finalize.
Ignore the number prefixes on each file. This is just to ensure proper order in the Gist.
It's based on eric1234 gist https://gist.github.com/911003. ijust made it 3.1 compliant in terms of convention