Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
muryoimpl committed Mar 10, 2016
1 parent 2d9e6c4 commit c4aeaf2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/buoys/helper.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
module Buoys
module Helper
@_buoys_renderer = nil
# Declare the breadcrumb which want to render in view.
#
# <%= buoy :help, true %>
Expand All @@ -21,10 +20,12 @@ def buoy(key, *args)
# <% end %>
# <% end %>
def buoys
return [] if @_buoys_renderer.nil?

@_buoys_renderer.render
buoys_renderer.render
end
alias_method :breadcrumbs, :buoys

def buoys_renderer
@_buoys_renderer ||= Buoys::Renderer.new(self, nil)
end
end
end

0 comments on commit c4aeaf2

Please sign in to comment.