Automagic number of views/clicks?


#1

Hey,

Just wondering… Are there are any automagic constructs in rails for
keeping track of number of views/clicks associated with the record? For
example, created_at and updated_at are automagically updated on edit/new
actions, are there any similar constructs for clicks/views of the
record?

Thanks.
Ilya


#2

On 24 May 2006, at 17:55, Ilya G. wrote:

Hey,

Just wondering… Are there are any automagic constructs in rails for
keeping track of number of views/clicks associated with the record?
For
example, created_at and updated_at are automagically updated on
edit/new
actions, are there any similar constructs for clicks/views of the
record?

Nope, but nothing prevents you from rolling your own (and even
sharing it with the community), you could have a look at http://
wiki.rubyonrails.org/rails/pages/Howto+Add+created_by+and+updated_by/
versions/3 or the plug-in to have an idea on how to start.

Best regards

Peter De Berdt