Module: TimeagoHelper
- Defined in:
- app/helpers/timeago_helper.rb
Instance Method Summary collapse
Instance Method Details
#timeago(time, options = {}) ⇒ Object
2 3 4 5 6 |
# File 'app/helpers/timeago_helper.rb', line 2 def timeago(time, = {}) time = time.to_time if time.is_a? String [:class] ||= 'timeago' content_tag(:abbr, time.to_s, .merge(title: time.getutc.iso8601)) if time end |