I have a download link on my page, whick looks like that :
<%=link_to "Download", @photo.public_filename, :class => "thickbox"%>
As you see, I m displyaing an image in a thickbox popup. However I
would like to count the number of times the user clicks on this link,
to get a number of downloads, and so increment a value in my db each
time the link is clicked. But how can I achieve this. Is there a way
to couple an ajax call to this link ?
Also, I want to display the number of downloads for " today ". Anyone
has an idea of how I can do this.
Thx in advance,