Module: BootstrapRainbow::Breadcrumbs::ClassMethods

Defined in:
lib/bootstrap_rainbow/breadcrumbs.rb

Instance Method Summary collapse

Instance Method Details

#add_breadcrumb(name, url, options = {}) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/bootstrap_rainbow/breadcrumbs.rb', line 9

def add_breadcrumb(name, url, options = {})
  class_name = self.name
  before_filter options do |controller|
    name = controller.send :translate_breadcrumb, name, class_name if name.is_a?(Symbol)
    controller.send :add_breadcrumb, name, url
  end
end