On 18 Aug 2009, at 06:24, Marnen Laibow-Koser wrote:

>> I am looking for the possibility of using link_to. When clicked, it
>> should download the file and update the db in its onclick event.
>>
>> not sure how to do that/
>
> Apparently you didn't fully read my first message.  Go back and do  
> that,
> since I explain it there.  (Hint: onclick doesn't come into it.)

In case your penny doesn't drop:

User clicks link  ->  Serverside method "download" is triggered  ->   
"download" methods does downloads = downloads + 1, save to db, and  
then return file to download


Best regards

Peter De Berdt


--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to