diff --git a/app/controllers/links_controller.rb b/app/controllers/links_controller.rb index 07970af..049aa81 100644 --- a/app/controllers/links_controller.rb +++ b/app/controllers/links_controller.rb @@ -15,7 +15,8 @@ def index # GET /links/1.json def show link = Link.find_by_subdomain!(request.subdomain) - + link.visits += 1 + link.save redirect_to link.url end