From dd6848912cdcf7a3c2d00397d79bd9c19f7cd317 Mon Sep 17 00:00:00 2001 From: Albert Yi Date: Mon, 4 Jun 2018 10:18:32 -0700 Subject: [PATCH] change render nothing calls to head ok --- app/controllers/application_controller.rb | 2 +- app/controllers/related_tags_controller.rb | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 1a322042e..649546155 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -111,7 +111,7 @@ class ApplicationController < ActionController::Base flash[:notice] = "This feature isn't available: #{@exception.message}" respond_to do |fmt| fmt.html { redirect_back fallback_location: root_path } - fmt.js { render nothing: true, status: 501 } + fmt.js { head 501 } fmt.json { render template: "static/error", status: 501 } fmt.xml { render template: "static/error", status: 501 } end diff --git a/app/controllers/related_tags_controller.rb b/app/controllers/related_tags_controller.rb index 4a1cff36b..c686d035e 100644 --- a/app/controllers/related_tags_controller.rb +++ b/app/controllers/related_tags_controller.rb @@ -17,7 +17,6 @@ class RelatedTagsController < ApplicationController @tag.related_tags = params[:related_tags] @tag.related_tags_updated_at = Time.now @tag.save - - render nothing: true + head :ok end end