Module: Filemagic::ApplicationHelper

Defined in:
app/helpers/filemagic/application_helper.rb

Instance Method Summary collapse

Instance Method Details

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



3
4
5
6
7
8
9
10
# File 'app/helpers/filemagic/application_helper.rb', line 3

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