Files
nairobi/app/helpers/layouts_helper.rb
Javi Martín 749428d93f Replace content_tag with new tag builder syntax
One of the main advantages of this syntax is we can now omit the content
parameter when it's empty.
2020-04-27 19:26:37 +02:00

11 lines
290 B
Ruby

module LayoutsHelper
def layout_menu_link_to(text, path, is_active, options)
if is_active
tag.span(t("shared.you_are_in"), class: "show-for-sr") + " " +
link_to(text, path, options.merge(class: "is-active"))
else
link_to(text, path, options)
end
end
end