You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nick Dainty edited this page Nov 22, 2013
·
4 revisions
Bootstrap pagination as default renderer
Overwrite the will_paginate method in your application helper, so you do not have to always explicitly set the renderer to Bootstrap:
moduleApplicationHelper# Always use the Twitter Bootstrap pagination rendererdefwill_paginate(collection_or_options=nil,options={})ifcollection_or_options.is_a?Hashoptions,collection_or_options=collection_or_options,nilendunlessoptions[:renderer]options=options.merge:renderer=>BootstrapPagination::Railsendsuper *[collection_or_options,options].compactendend
Thanks lawitschka for contributing the code above.