Skip to content

Commit

Permalink
Link#show increments visits
Browse files Browse the repository at this point in the history
  • Loading branch information
nmanzi committed Oct 7, 2011
1 parent 434e382 commit eaea3ae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/controllers/links_controller.rb
Expand Up @@ -15,7 +15,8 @@ def index
# GET /links/1.json # GET /links/1.json
def show def show
link = Link.find_by_subdomain!(request.subdomain) link = Link.find_by_subdomain!(request.subdomain)

link.visits += 1
link.save
redirect_to link.url redirect_to link.url
end end


Expand Down

0 comments on commit eaea3ae

Please sign in to comment.