Unlike all other tag helpers, the link helper doesn't accept options. So you can't to do something like:
link "Something", to: Something::Index, options: aria_current(Something::Index)
private def aria_current(path)
return {} of String => String unless current_page?(path)
{"aria-current" => "page"}
end
because this is such a common use case, I've also been thinking about an additional helper to simplify this:
link_with_aria, to: Something::Index
But perhaps that a step too far.
Unlike all other tag helpers, the
linkhelper doesn't acceptoptions. So you can't to do something like:because this is such a common use case, I've also been thinking about an additional helper to simplify this:
But perhaps that a step too far.