更新「app/controllers/announcement_link_widgets_controller.rb」
fix File.exists?
This commit is contained in:
parent
ddc977b902
commit
3ce59e6f49
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue