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

Version Path
bootstrapped-rails-2.0.9.rc2 lib/bootstrapped-rails/breadcrumbs.rb
bootstrapped-rails-2.0.9.rc1 lib/bootstrapped-rails/breadcrumbs.rb
bootstrapped-rails-2.0.8.5 lib/bootstrapped-rails/breadcrumbs.rb
bootstrapped-rails-2.0.8.4 lib/bootstrapped-rails/breadcrumbs.rb
bootstrapped-rails-2.0.8.3 lib/bootstrapped-rails/breadcrumbs.rb
bootstrapped-rails-2.0.8.2 lib/bootstrapped-rails/breadcrumbs.rb
bootstrapped-rails-2.0.8.1 lib/bootstrapped-rails/breadcrumbs.rb
bootstrapped-rails-2.0.8 lib/bootstrapped-rails/breadcrumbs.rb
bootstrapped-rails-2.0.7.9 lib/bootstrapped-rails/breadcrumbs.rb
bootstrapped-rails-2.0.7.8 lib/bootstrapped-rails/breadcrumbs.rb
bootstrapped-rails-2.0.7.7 lib/bootstrapped-rails/breadcrumbs.rb
bootstrapped-rails-2.0.7.6 lib/bootstrapped-rails/breadcrumbs.rb
bootstrapped-rails-2.0.7.5 lib/bootstrapped-rails/breadcrumbs.rb
bootstrapped-rails-2.0.7.4 lib/bootstrapped-rails/breadcrumbs.rb
bootstrapped-rails-2.0.7.3 lib/bootstrapped-rails/breadcrumbs.rb