Sha256: 55ac3d600328593573f63888e2531f94398aa4bd07889143c31bb650244ab491
Contents?: true
Size: 525 Bytes
Versions: 9
Compression:
Stored size: 525 Bytes
Contents
def partial(template, *args) options = args.last.is_a?(Hash) ? args.pop : { } options.merge!(:layout => false) if collection = options.delete(:collection) then haml_concat(collection.inject([]) do |buffer, member| buffer << haml(template, options.merge( :layout => false, :locals => {template.to_sym => member} ) ) end.join("\n")) else haml_concat(haml(template, options)) end end
Version data entries
9 entries across 9 versions & 1 rubygems