I am relatively new to Rails and I am trying to do a fairly common task.
I have a page that displays a series of links that go to offsite URLS.
Next to each link is a counter that shows how many times that link has
been clicked-through. I would like to be able to have the user click on
a the link, be directed to the links address, AND at the same time, have
a function create and add a “click-through” to the “clicks” database.
I was reading about the link_to_function helper but that doesn’t seem to
be quite what I want, but then again, I may not be understanding it
Does anyone have any method for doing anything similar in their apps? I
would love an help or advice.
Thank you in advance.