fix error

This commit is contained in:
邱博亞 2021-11-15 12:39:30 +08:00
parent 398d9e5027
commit 6e169b779d
1 changed files with 2 additions and 2 deletions

View File

@ -39,14 +39,14 @@ class FaqsController < ApplicationController
return {} if (faq.category.disable rescue false) return {} if (faq.category.disable rescue false)
locale = I18n.locale.to_s locale = I18n.locale.to_s
faqs_files = faq.qa_files.collect do |f| faqs_files = faq.qa_files.collect do |f|
next if !qa_file.enabled_for?(locale) next if !qa_file.enabled_for?(locale)
{ {
"file_url" => f.file.url + "\" title=\"#{f.file_title}", "file_url" => f.file.url + "\" title=\"#{f.file_title}",
"file_title" => f.title "file_title" => f.title
} }
end end.compact
faqs_links = faq.qa_links.collect do |f| faqs_links = faq.qa_links.collect do |f|
{ {
"link_url" => f.url, "link_url" => f.url,