Sha256: 900ed256acc0494252e1d1c4a829403eb35bd45510eeb693be971cfcec16490d
Contents?: true
Size: 592 Bytes
Versions: 19
Compression:
Stored size: 592 Bytes
Contents
module MessageTrain # Application helper module ApplicationHelper def message_train_widget render partial: 'message_train/application/widget' end def fuzzy_date(date) time = Time.parse(date.strftime('%F %T')) case Time.now - time when 0..1.minute :just_now.l when 1.minute..1.day l(time, format: :fuzzy_today) when 1.day..1.week l(time, format: :fuzzy_this_week) when 1.week..1.year l(time, format: :fuzzy_date_without_year) else l(time, format: :fuzzy_date) end end end end
Version data entries
19 entries across 19 versions & 1 rubygems