Prevent crash if file does not exists

This commit is contained in:
Dmitriy Zaporozhets 2015-02-23 21:48:02 -08:00
parent 345fd545bf
commit deb384a73b

View file

@ -1,5 +1,7 @@
module VersionCheckHelper
def version_status_badge
image_tag VersionCheck.new.url
if File.exists?(Rails.root.join('safe', 'public.pem'))
image_tag VersionCheck.new.url
end
end
end