I''m trying to keep a Last Modified column in my record lists a fixed width and as narrow as possible. <td><%=time_ago_in_words record.updated_at%></td> However, making room for certain values like "less than a minute" force me to make the column twice as wide than, say, "12 hours" or "10 days". I would prefer "0 minutes" or "0 hours" instead of "less than a minute". Does anyone have a suggestion on how I can do this? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
On Sep 12, 2006, at 21:08, Erik Haugo wrote:> I would prefer "0 minutes" or "0 hours" instead of "less than a > minute". > > Does anyone have a suggestion on how I can do this?Look at the source for the distance_of_time_in_words helper, then create your own helper method tat acts like you want it. -- Jakob Skjerning - http://mentalized.net --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---