2010-03-05から1日間の記事一覧

SinatraとHamlでRailsっぽくPartialする

helpers do def partial(template, *args) options = args.last.is_a?(Hash) ? args.pop : {} options.merge!(:layout => false) if collection = options.delete(:collection) then collection.inject([]) do |buffer, member| buffer << haml(template, op…