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, = {}) [:class] ||= "timeago" content_tag( :time, time.to_s, .merge(datetime: time.getutc.iso8601) ) if time end |