Class: MenuLinkPresenter
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- MenuLinkPresenter
- Includes:
- ActionView::Helpers::TagHelper
- Defined in:
- app/presenters/menu_link_presenter.rb
Instance Method Summary collapse
Instance Method Details
#badge ⇒ Object
15 16 17 18 19 |
# File 'app/presenters/menu_link_presenter.rb', line 15 def badge return "" if no_badge? content_tag(:span, link.badge, class: 'badge') end |
#certification_badge ⇒ Object
21 22 23 24 25 |
# File 'app/presenters/menu_link_presenter.rb', line 21 def certification_badge return "" if no_certification_badge? content_tag(:span, content_tag(:i, '', class: "cert-status #{link.certification_badge}") + " #{link.certification_badge.titleize}", class: 'badge label-icon') end |
#css_class ⇒ Object
27 28 29 |
# File 'app/presenters/menu_link_presenter.rb', line 27 def css_class "active" if selected? end |
#featured_tag(name) ⇒ Object
7 8 9 10 11 12 13 |
# File 'app/presenters/menu_link_presenter.rb', line 7 def featured_tag(name) if featured? content_tag(:em, name.html_safe) else name.html_safe end end |