Module: TimeAgoHelper

Defined in:
app/helpers/time_ago_helper.rb

Instance Method Summary collapse

Instance Method Details

#timeago(time, options = {}) ⇒ Object



2
3
4
5
6
7
8
9
# File 'app/helpers/time_ago_helper.rb', line 2

def timeago(time, options = {})
  options[:class] ||= "timeago"
  (
    :time,
    time.to_s,
    options.merge(datetime: time.getutc.iso8601)
  ) if time
end