Module: LybSidebar::Helper
- Defined in:
- lib/lyb_sidebar/helper.rb
Instance Method Summary collapse
-
#prepare_sidebars ⇒ Object
Sidebar.
- #render_sidebar ⇒ Object
- #render_sidebars ⇒ Object
- #sidebar_tag_filter ⇒ Object
-
#tag_filter(model = nil, filters = nil, scope = :tagged_with) ⇒ Object
Tag support.
Instance Method Details
#prepare_sidebars ⇒ Object
Sidebar
18 19 20 21 22 23 24 |
# File 'lib/lyb_sidebar/helper.rb', line 18 def return if controller..nil? for partial in controller. render partial end end |
#render_sidebar ⇒ Object
26 27 28 |
# File 'lib/lyb_sidebar/helper.rb', line 26 def content_for :sidebar end |
#render_sidebars ⇒ Object
30 31 32 33 |
# File 'lib/lyb_sidebar/helper.rb', line 30 def end |
#sidebar_tag_filter ⇒ Object
11 12 13 14 15 |
# File 'lib/lyb_sidebar/helper.rb', line 11 def content_for :sidebar do tag_filter end end |
#tag_filter(model = nil, filters = nil, scope = :tagged_with) ⇒ Object
Tag support
4 5 6 7 8 9 |
# File 'lib/lyb_sidebar/helper.rb', line 4 def tag_filter(model = nil, filters = nil, scope = :tagged_with) model ||= controller_name.singularize.camelize.constantize filters ||= model. render 'layouts/tag_filter', :filters => filters, :scope => scope end |