Forum: Ruby on Rails Noob: format column in scaffold (i.e. - datetime)

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Kevin C. (Guest)
on 2006-01-26 06:54
This is my first RoR project so go easy. It's a simple directory with
contacts. I have two datetime columns in my database (created_at and
updated_at). In the list view (changed very little from default
generated by scaffold) I want them to display as time_ago_in_words or
:long or :short (not sure yet). The default just takes up too much
space. In the show view this is fine and even preferred. I can't figure
out how to change this before I render the list view. Presumably this
would be done in my directory controller, but I'm not sure and
everything I've tried doesn't work. Thanks in advance.
This topic is locked and can not be replied to.