更新「app/controllers/announcement_link_widgets_controller.rb」

fix File.exists?
This commit is contained in:
chiu 2023-04-08 14:44:15 +00:00
parent ddc977b902
commit 3ce59e6f49
1 changed files with 1 additions and 1 deletions

View File

@ -9,7 +9,7 @@ class AnnouncementLinkWidgetsController < ApplicationController
} }
} }
f = File.join(Rails.root, "public" , "announcement_link_widget_#{I18n.locale.to_s}.json") f = File.join(Rails.root, "public" , "announcement_link_widget_#{I18n.locale.to_s}.json")
if File.exists?(f) if File.exist?(f)
contents = File.read(f) contents = File.read(f)
data = JSON.parse(contents) data = JSON.parse(contents)
end end