Forum: Ruby on Rails override automatic update of updated_on column

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
elisfanclub (Guest)
on 2006-05-29 10:39
(Received via mailing list)
i know that title sounds confusing, but here is the deal:

the two columns that we are concerned with for this question are the
"updated_on" column and the "views" column.  the views column increases
everytime a user visits a certain page.  like this:

@object.update_attributes(:views => @object.views + 1)

the problem is that when a user visits the page, it AUTOMATICALLY
updates the "update_on" column with the current time.  i don't want this
to happen.  how can i rewrite this so it DOES NOT update the "update_on"
column and only the "views" column?


This topic is locked and can not be replied to.