I try to find a way to count the pageviews in the database
In my show page i have
<%= @advert.views %>
In the model i have this
self.views =+ 1
For now i only get number 1 when I view the page and the database won’t
count the views.
In the database the views stays at 0
How can i make the database counts 1 each time i visit the page.