13 lines
431 B
Ruby
13 lines
431 B
Ruby
|
|
module FaqsHelper
|
||
|
|
|
||
|
|
def faqs_links(products, current_product = nil)
|
||
|
|
content = []
|
||
|
|
content << content_tag(:li, link_to(t("txt.faqs.general_faqs"), general_faqs_path)) if current_product
|
||
|
|
for product in products
|
||
|
|
content << content_tag(:li, link_to("#{product.name} #{t("txt.faqs.faqs")}", product_faqs_path(product))) if product.has_faqs? && product != current_product
|
||
|
|
end
|
||
|
|
return content.join
|
||
|
|
end
|
||
|
|
|
||
|
|
end
|