简体   繁体   中英

Active Admin: Is it possible to add an href to an f.input hint string?

I am trying to add an external link to an active admin form input hint

form do |f|
  f.input :catalog_icon,
    hint: "Use a font-awesome icon class name, e.g. 'fas fa-star'."\
    " See https://fontawesome.com/icons/ for a list of available icons."
...
end

Is this possible?

Didn't know I could just pass .html_safe to the hint string, to render a hint with html. ie

form do |f|
  f.input :catalog_icon,
    hint: "Use a font-awesome icon class name, e.g. 'fas fa-star'."\
    " See <a href=\"https://fontawesome.com/icons/\">fontawesome</a>"\
    " for a list of available icons.".html_safe
...
end

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM