Sha256: 208024b56ae6fecb96a24ae8f51aac1cf8e467ce9707dfd1c817423a0165fe5c
Contents?: true
Size: 549 Bytes
Versions: 15
Compression:
Stored size: 549 Bytes
Contents
module Integrity module Helpers module Breadcrumbs def pages @pages ||= [["projects", "/"], ["new project", "/new"]] end def breadcrumbs(*crumbs) crumbs[0..-2].map do |crumb| if page_data = pages.detect {|c| c.first == crumb } %Q(<a href="#{page_data.last}">#{page_data.first}</a>) elsif @project && @project.permalink == crumb %Q(<a href="#{project_url(@project)}">#{@project.permalink}</a>) end end + [crumbs.last] end end end end
Version data entries
15 entries across 15 versions & 6 rubygems