jmax / wething

0 stars 1 forks source link

Views tracking #23

Closed jmax closed 11 years ago

jmax commented 11 years ago

We'd like to implement a basic views tracking for the URLs we stored in the system.

Every time I click on an URL, the system should increment a views counter for that URL, before redirecting to the referenced site.

Here's the user story for this feature:

I am logged in And I visit root_url

Given I have a thing stored And it has 0 views

When I click on thing's URL

Then the thing's views counter should be 1 And I should be redirected to that URL

Caveats:

jmax commented 11 years ago

Must watch: http://railscasts.com/episodes/23-counter-cache-column