Permalink
Browse files

Merge pull request #21 from wuwx/master

让helper直接从ActionController::Base产生
  • Loading branch information...
2 parents 2e9f275 + 764eb31 commit 0688a8103dc7829809046e9e5a628dbce74ead23 @xdite committed Jan 26, 2013
Showing with 4 additions and 4 deletions.
  1. +3 −3 lib/bootstrap_helper/breadcrumb.rb
  2. +1 −1 lib/bootstrap_helper/engine.rb
@@ -53,14 +53,14 @@ def render_breadcrumb
if i == (@breadcrumbs.length - 1)
breadcrumb_content = c
else
- breadcrumb_content = c + content_tag(:span, "/", :class => "divider")
+ breadcrumb_content = c + " " + content_tag(:span, "/", :class => "divider")
end
- crumb += content_tag(:li, breadcrumb_content ,:class => breadcrumb_class )
+ crumb += content_tag(:li, breadcrumb_content ,:class => breadcrumb_class ) + "\n"
end
return prefix + content_tag(:ul, crumb, :class => "breadcrumb menu clearfix")
end
end
end
-end
+end
@@ -10,7 +10,7 @@ class Engine < ::Rails::Engine
end
config.to_prepare do
- ApplicationController.send :include, BootstrapHelper::Breadcrumb
+ ActionController::Base.send :include, BootstrapHelper::Breadcrumb
end
end

0 comments on commit 0688a81

Please sign in to comment.