distance_of_time_in_words(Time.now, real_time + 0.seconds, true).gsub('about ','')
look here for more information
try helper (put this code in app / helpers / application_helper.rb)
def remove_unwanted_words string bad_words = ["less than", "about"] bad_words.each do |bad| string.gsub!(bad + " ", '') end return string end
in bad words you can define the lines that you want to remove from this line. user like this:
<%= remove_unwanted_words distance_of_time_in_words(Time.now, real_time + 0.seconds, true) %>
klump source share