Sha256: 0cacd19558538c9e89670e252a6970c9aa036b3e2713b28f2d37c3f360d61cf0
Contents?: true
Size: 489 Bytes
Versions: 15
Compression:
Stored size: 489 Bytes
Contents
require 'active_support' module Bootstrapped module BreadCrumbs extend ActiveSupport::Concern module ClassMethods def add_breadcrumb name, url, options={} before_filter options do |controller| controller.send :add_breadcrumb, name, url end end end protected def add_breadcrumb name, url = '' @breadcrumbs ||= [] url = eval(url) if url =~ /_path|_url|@/ @breadcrumbs << {name: name, url: url} end end end
Version data entries
15 entries across 15 versions & 1 rubygems