Files
componentowl-rails-archive/app/helpers/faqs_helper.rb

13 lines
431 B
Ruby
Raw Normal View History

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