1
0
Fork 0

Do not respond to JSON requests

This commit is contained in:
Andrew Tomaka 2013-04-06 12:01:39 -04:00
parent ed89322e60
commit 0489c51518

View file

@ -7,7 +7,6 @@ class AlertsController < ApplicationController
respond_to do |format| respond_to do |format|
format.html # index.html.erb format.html # index.html.erb
format.json { render json: @alerts }
end end
end end
@ -19,7 +18,6 @@ class AlertsController < ApplicationController
respond_to do |format| respond_to do |format|
format.html # show.html.erb format.html # show.html.erb
format.xml # show.xml.builder format.xml # show.xml.builder
format.json { render json: @alert }
end end
end end
@ -30,7 +28,6 @@ class AlertsController < ApplicationController
respond_to do |format| respond_to do |format|
format.html # new.html.erb format.html # new.html.erb
format.json { render json: @alert }
end end
end end
@ -47,10 +44,8 @@ class AlertsController < ApplicationController
respond_to do |format| respond_to do |format|
if @alert.save if @alert.save
format.html { redirect_to @alert, notice: 'Alert was successfully created.' } format.html { redirect_to @alert, notice: 'Alert was successfully created.' }
format.json { render json: @alert, status: :created, location: @alert }
else else
format.html { render action: "new" } format.html { render action: "new" }
format.json { render json: @alert.errors, status: :unprocessable_entity }
end end
end end
end end
@ -63,10 +58,8 @@ class AlertsController < ApplicationController
respond_to do |format| respond_to do |format|
if @alert.update_attributes(params[:alert]) if @alert.update_attributes(params[:alert])
format.html { redirect_to @alert, notice: 'Alert was successfully updated.' } format.html { redirect_to @alert, notice: 'Alert was successfully updated.' }
format.json { head :no_content }
else else
format.html { render action: "edit" } format.html { render action: "edit" }
format.json { render json: @alert.errors, status: :unprocessable_entity }
end end
end end
end end
@ -79,7 +72,6 @@ class AlertsController < ApplicationController
respond_to do |format| respond_to do |format|
format.html { redirect_to alerts_url } format.html { redirect_to alerts_url }
format.json { head :no_content }
end end
end end
end end