time_ago_in_words_tagged: handle times set in the future.
This commit is contained in:
@@ -90,7 +90,11 @@ module ApplicationHelper
|
|||||||
end
|
end
|
||||||
|
|
||||||
def time_ago_in_words_tagged(time)
|
def time_ago_in_words_tagged(time)
|
||||||
raw time_tag(time_ago_in_words(time) + " ago", time)
|
if time.past?
|
||||||
|
raw time_tag(time_ago_in_words(time) + " ago", time)
|
||||||
|
else
|
||||||
|
raw time_tag("in " + distance_of_time_in_words(Time.now, time), time)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def compact_time(time)
|
def compact_time(time)
|
||||||
|
|||||||
Reference in New Issue
Block a user