Permalink
Browse files

Merge pull request #20 from barsoom/master

Fix Rails 3.2 deprecation warning (closes GH-17)
  • Loading branch information...
2 parents 5373141 + e422132 commit 92b979184027ec7c440c48308bdf132df4a52aed @weppos weppos committed Feb 3, 2012
Showing with 10 additions and 13 deletions.
  1. +10 −13 lib/breadcrumbs_on_rails/controller_mixin.rb
@@ -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)
@@ -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)

0 comments on commit 92b9791

Please sign in to comment.