diff --git a/lib/age_words.rb b/lib/age_words.rb index 7fa21c5f4e5..92587ec30f4 100644 --- a/lib/age_words.rb +++ b/lib/age_words.rb @@ -1,8 +1,12 @@ module AgeWords def self.age_words(secs) - return "—" if secs.blank? - return FreedomPatches::Rails4.distance_of_time_in_words(Time.now, Time.now + secs) + if secs.blank? + "—" + else + now = Time.now + FreedomPatches::Rails4.distance_of_time_in_words(now, now + secs) + end end end