Permalink
Browse files

Added file checking

  • Loading branch information...
1 parent 4f77044 commit bbfc3e3663c3b023e5fcf4ae4b3f92b66f057e6c @SeanRoberts committed Mar 5, 2012
Showing with 10 additions and 8 deletions.
  1. +10 −8 app/views/layouts/application.html.haml
@@ -28,14 +28,16 @@
%p
%br/
%small
- %strong Server Status Last Update:
- %br/
- = File.mtime(File.join(Rails.root, 'tmp', 'status_cache.txt')).strftime('%B %e, %Y at %l:%M%p')
- %br/
- %strong Group Member List Last Update:
- %br/
- = File.mtime(File.join(Rails.root, 'tmp', 'group_cache_lostcontinents.xml')).strftime('%B %e, %Y at %l:%M%p')
- %br/
+ - if File.exist?(File.join(Rails.root, 'tmp', 'status_cache.txt'))
+ %strong Server Status Last Update:
+ %br/
+ = File.mtime(File.join(Rails.root, 'tmp', 'status_cache.txt')).strftime('%B %e, %Y at %l:%M%p')
+ %br/
+ - if File.exist?(File.join(Rails.root, 'tmp', 'group_cache_lostcontinents.xml'))
+ %strong Group Member List Last Update:
+ %br/
+ = File.mtime(File.join(Rails.root, 'tmp', 'group_cache_lostcontinents.xml')).strftime('%B %e, %Y at %l:%M%p')
+ %br/
%strong Current Server Time:
%br/
= Time.now.strftime('%l:%M%p on %B %e, %Y')

0 comments on commit bbfc3e3

Please sign in to comment.