From 523af13e05a16312b6d6209d7da83807cabfd855 Mon Sep 17 00:00:00 2001 From: bohung Date: Tue, 23 Mar 2021 16:36:12 +0800 Subject: [PATCH] Fix bug. --- app/controllers/faqs_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/faqs_controller.rb b/app/controllers/faqs_controller.rb index 2b48ae2..e9e0ca2 100644 --- a/app/controllers/faqs_controller.rb +++ b/app/controllers/faqs_controller.rb @@ -11,7 +11,7 @@ class FaqsController < ApplicationController qa_files = qa.qa_files.map do |qa_file| { "file_url" => qa_file.file.url, - "file_title" => qa_file.title.blank? ? File.basename(qa_file["file"]) + "file_title" => (qa_file.title.blank? ? File.basename(qa_file["file"]) : qa_file.title) } end {