Module: Bh::LinkToHelper
- Includes:
- BaseHelper
- Defined in:
- lib/bh/helpers/link_to_helper.rb
Instance Method Summary collapse
-
#link_to(*args, &block) ⇒ Object
Overrides ActionView +link_to+ to be able to add the 'alert-link' class to the link in case the link is inside of an alert.
Instance Method Details
#link_to(*args, &block) ⇒ Object
Overrides ActionView +link_to+ to be able to add the 'alert-link' class to the link in case the link is inside of an alert. Overrides ActionView +link_to+ to be able to surround the link in a '
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/bh/helpers/link_to_helper.rb', line 14 def link_to(*args, &block) if @alert_link super *add_link_class!('alert-link', *args, &block), &block elsif @navbar_vertical super *add_link_class!('navbar-brand', *args, &block), &block elsif @dropdown_link content_tag :li, role: :presentation do super *(*args, &block), &block end elsif @nav_link content_tag :li, super(*args, &block), (*args, &block) else super *args, &block end end |