From 03b5ef810f8054f2c383ff1fc23325ad374a6ae7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B1=E5=8D=9A=E4=BA=9E?= Date: Tue, 23 Nov 2021 13:27:11 +0800 Subject: [PATCH] fix error --- app/controllers/faqs_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/faqs_controller.rb b/app/controllers/faqs_controller.rb index c17706d..0195aac 100644 --- a/app/controllers/faqs_controller.rb +++ b/app/controllers/faqs_controller.rb @@ -42,13 +42,13 @@ class FaqsController < ApplicationController return {} if (faq.category.disable rescue false) locale = I18n.locale.to_s - faqs_files = faq.qa_files.collect do |f| + faqs_files = faq.qa_files.collect do |qa_file| next if !qa_file.enabled_for?(locale) file = qa_file.file next if file.path.nil? { - "file_url" => file.url + "\" title=\"#{f.file_title}", - "file_title" => f.title + "file_url" => file.url + "\" title=\"#{qa_file.file_title}", + "file_title" => qa_file.title } end.compact faqs_links = faq.qa_links.collect do |f|