_explication: display champ.description instead of champ.value
This commit is contained in:
parent
902cd1b4d9
commit
28c4dde96d
4 changed files with 39 additions and 4 deletions
|
@ -2,4 +2,10 @@ module ChampHelper
|
|||
def is_not_header_nor_explication?(champ)
|
||||
!['header_section', 'explication'].include?(champ.type_champ)
|
||||
end
|
||||
|
||||
def html_formatted_description(description)
|
||||
html_formatted = simple_format(description)
|
||||
with_links = html_formatted.gsub(URI.regexp, '<a target="_blank" href="\0">\0</a>')
|
||||
sanitize(with_links, attributes: %w(href target))
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue