diff options
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/core_helper.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/helpers/core_helper.rb b/app/helpers/core_helper.rb index f34d2f2..05efb95 100644 --- a/app/helpers/core_helper.rb +++ b/app/helpers/core_helper.rb @@ -29,4 +29,12 @@ module CoreHelper }.join(" ").html_safe end + # + # displays the datetime as time ago in words, + # but has the absolute time in a tooltip. + # + def simple_date(datetime) + content_tag :span, time_ago_in_words(datetime), :title => datetime.to_s, :class => 'date' + end + end |