tiny urls redirection
This commit is contained in:
parent
22e8183508
commit
0e2c14518f
@ -45,11 +45,11 @@ class TinyUrlsController < ApplicationController
|
|||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
if @tiny_url.save
|
if @tiny_url.save
|
||||||
format.html { redirect_to @tiny_url, notice: 'Tiny url was successfully created.' }
|
format.html { redirect_to tiny_urls_url, notice: 'Tiny url was successfully created.' }
|
||||||
format.json { render json: @tiny_url, status: :created, location: @tiny_url }
|
|
||||||
else
|
else
|
||||||
format.html { render action: "new" }
|
format.html { render action: "new" }
|
||||||
format.json { render json: @tiny_url.errors, status: :unprocessable_entity }
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -61,11 +61,11 @@ class TinyUrlsController < ApplicationController
|
|||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
if @tiny_url.update_attributes(params[:tiny_url])
|
if @tiny_url.update_attributes(params[:tiny_url])
|
||||||
format.html { redirect_to @tiny_url, notice: 'Tiny url was successfully updated.' }
|
format.html { redirect_to tiny_urls_url, notice: 'Tiny url was successfully updated.' }
|
||||||
format.json { head :no_content }
|
|
||||||
else
|
else
|
||||||
format.html { render action: "edit" }
|
format.html { render action: "edit" }
|
||||||
format.json { render json: @tiny_url.errors, status: :unprocessable_entity }
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user