From 0489c5151890d98fdfeeb990d04921221ec6517f Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Sat, 6 Apr 2013 12:01:39 -0400 Subject: [PATCH] Do not respond to JSON requests --- app/controllers/alerts_controller.rb | 8 -------- 1 file changed, 8 deletions(-) diff --git a/app/controllers/alerts_controller.rb b/app/controllers/alerts_controller.rb index 1fa4bad..1c54a0b 100644 --- a/app/controllers/alerts_controller.rb +++ b/app/controllers/alerts_controller.rb @@ -7,7 +7,6 @@ class AlertsController < ApplicationController respond_to do |format| format.html # index.html.erb - format.json { render json: @alerts } end end @@ -19,7 +18,6 @@ class AlertsController < ApplicationController respond_to do |format| format.html # show.html.erb format.xml # show.xml.builder - format.json { render json: @alert } end end @@ -30,7 +28,6 @@ class AlertsController < ApplicationController respond_to do |format| format.html # new.html.erb - format.json { render json: @alert } end end @@ -47,10 +44,8 @@ class AlertsController < ApplicationController respond_to do |format| if @alert.save format.html { redirect_to @alert, notice: 'Alert was successfully created.' } - format.json { render json: @alert, status: :created, location: @alert } else format.html { render action: "new" } - format.json { render json: @alert.errors, status: :unprocessable_entity } end end end @@ -63,10 +58,8 @@ class AlertsController < ApplicationController respond_to do |format| if @alert.update_attributes(params[:alert]) format.html { redirect_to @alert, notice: 'Alert was successfully updated.' } - format.json { head :no_content } else format.html { render action: "edit" } - format.json { render json: @alert.errors, status: :unprocessable_entity } end end end @@ -79,7 +72,6 @@ class AlertsController < ApplicationController respond_to do |format| format.html { redirect_to alerts_url } - format.json { head :no_content } end end end