Skip to content

Commit

Permalink
renamed breadcrum method to breadcrumbed to avoid conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
ArmandoAmador committed Feb 10, 2016
1 parent d27a796 commit 83148c4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/breadcrumbs_on_rails/action_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ module ActionController
included do
extend ClassMethods
helper HelperMethods
helper_method :add_breadcrumb, :breadcrumbs
helper_method :add_breadcrumb, :breadcrumbed
end

protected

def add_breadcrumb(name, path = nil, options = {})
self.breadcrumbs << Breadcrumbs::Element.new(name, path, options)
self.breadcrumbed << Breadcrumbs::Element.new(name, path, options)
end

def breadcrumbs
@breadcrumbs ||= []
def breadcrumbed
@breadcrumbed ||= []
end

module Utils
Expand Down Expand Up @@ -79,7 +79,7 @@ def add_breadcrumb(name, path = nil, filter_options = {})
module HelperMethods

def render_breadcrumbs(options = {}, &block)
builder = (options.delete(:builder) || Breadcrumbs::SimpleBuilder).new(self, breadcrumbs, options)
builder = (options.delete(:builder) || Breadcrumbs::SimpleBuilder).new(self, breadcrumbed, options)
content = builder.render.html_safe
if block_given?
capture(content, &block)
Expand Down

0 comments on commit 83148c4

Please sign in to comment.