I wanted to display datetime in words, like "1 hour ago" and i tried the following method but it is returning returning html in the string format as shown below.
method
helper.time_ago_in_words(Time.now)
result
=> "<span class=\"translation_missing\" title=\"translation missing: en.less_than_x_minutes\">Less Than X Minutes</span>"
rails console output:
>> helper.time_ago_in_words(Time.now)
=> "<span class=\"translation_missing\" title=\"translation missing: en.less_than_x_minutes\">Less Than X Minutes</span>"
>> I18n.locale = :de
=> :de
>> helper.time_ago_in_words(Time.now)
=> "<span class=\"translation_missing\" title=\"translation missing: de.less_than_x_minutes\">Less Than X Minutes</span>"
>> I18n.locale = :en
=> :en
>> helper.time_ago_in_words(Time.now)
=> "<span class=\"translation_missing\" title=\"translation missing: en.less_than_x_minutes\">Less Than X Minutes</span>"