Skip to content

Instantly share code, notes, and snippets.

View stefl's full-sized avatar

Stef Lewandowski stefl

View GitHub Profile
@stefl
stefl / foundation_paginate.rb
Last active December 13, 2015 20:48 — forked from mariszin/foundation_paginate.rb
Zurb Foundation now uses 'current' instead of 'active' for the active page.
# Based on https://gist.github.com/1182136 and https://gist.github.com/1586384
# Make the will_paginate generate markup for Zurb Foundation
# Put this in config/initializers/foundation_paginate.rb
module WillPaginate
module ViewHelpers
class LinkRenderer < LinkRendererBase
protected
def html_container(html)
tag(:ul, html, container_attributes)
require 'rubygems'
require 'weary'
class Postie
def get(code)
(Weary.get "http://www.uk-postcodes.com/postcode/#{code.gsub(' ', '')}.json").perform
end
end
postie = Postie.new