You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
348 B
11 lines
348 B
3 years ago
|
module DetailsTableHelper
|
||
|
def details_html(attribute)
|
||
|
if attribute[:format] == :bullet
|
||
|
list = attribute[:value].map { |la| "<li>#{la}</li>"}.join("\n")
|
||
|
simple_format(list, { class: "govuk-list govuk-list--bullet" }, wrapper_tag: "ul")
|
||
|
else
|
||
|
simple_format(attribute[:value].to_s, {}, wrapper_tag: "div")
|
||
|
end
|
||
|
end
|
||
|
end
|