fixed bug with number only tags breaking js

This commit is contained in:
albert
2011-10-26 18:39:18 -04:00
parent 5a52ccbbc9
commit 9f21630c33
8 changed files with 13 additions and 9 deletions

View File

@@ -31,8 +31,10 @@ module ApplicationHelper
end
def compact_time(time)
if time > Time.now.beginning_of_day
time_tag(time.strftime("%H:%M"), time)
if time > Time.now.end_of_day
time_tag(time.strftime("%b %e, %Y"), time)
elsif time > Time.now.beginning_of_day
time_tag(time.strftime("%l:%M %P"), time)
elsif time > Time.now.beginning_of_year
time_tag(time.strftime("%b %e"), time)
else