Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Links show action redirects to link.url

  • Loading branch information...
commit 0333906b162aa16394a80a076825a3e82064b74f 1 parent 1487104
@nmanzi authored
Showing with 2 additions and 4 deletions.
  1. +2 −4 app/controllers/links_controller.rb
View
6 app/controllers/links_controller.rb
@@ -13,11 +13,9 @@ def index
# GET /links/1
# GET /links/1.json
def show
- @link = Link.find(params[:id])
+ link = Link.find(params[:id])
- respond_to do |format|
- format.json { render json: @link }
- end
+ redirect_to link.url
end
# GET /links/new
Please sign in to comment.
Something went wrong with that request. Please try again.