diff --git a/app/controllers/faqs_controller.rb b/app/controllers/faqs_controller.rb index 7a78ed0..cd48465 100644 --- a/app/controllers/faqs_controller.rb +++ b/app/controllers/faqs_controller.rb @@ -39,14 +39,14 @@ class FaqsController < ApplicationController return {} if (faq.category.disable rescue false) locale = I18n.locale.to_s - + faqs_files = faq.qa_files.collect do |f| next if !qa_file.enabled_for?(locale) { "file_url" => f.file.url + "\" title=\"#{f.file_title}", "file_title" => f.title } - end + end.compact faqs_links = faq.qa_links.collect do |f| { "link_url" => f.url,