Skip to content

Commit

Permalink
Merge pull request weppos#20 from barsoom/master
Browse files Browse the repository at this point in the history
Fix Rails 3.2 deprecation warning (closes wepposGH-17)
  • Loading branch information
weppos committed Feb 3, 2012
2 parents 5373141 + e422132 commit 92b9791
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions lib/breadcrumbs_on_rails/controller_mixin.rb
Expand Up @@ -13,11 +13,20 @@ module ControllerMixin

included do
extend ClassMethods
include InstanceMethods
helper HelperMethods
helper_method :add_breadcrumb, :breadcrumbs
end

protected

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

def breadcrumbs
@breadcrumbs ||= []
end

module Utils

def self.instance_proc(string)
Expand Down Expand Up @@ -65,18 +74,6 @@ def add_breadcrumb(name, path, filter_options = {})

end

module InstanceMethods
protected

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

def breadcrumbs
@breadcrumbs ||= []
end
end

module HelperMethods

def render_breadcrumbs(options = {}, &block)
Expand Down

0 comments on commit 92b9791

Please sign in to comment.