tags: automatically fix incorrect tag counts during maintenance.
* Automatically fix all tags with incorrect counts during daily maintenance (previously only tags with negative counts were fixed). * Log fixed tags to NewRelic. * Remove the ability to manually fix tag counts with the "Fix" button on the /tags listing. This is no longer necessary now that tags are fixed automatically.
This commit is contained in:
@@ -1,25 +0,0 @@
|
||||
class TagCorrectionsController < ApplicationController
|
||||
respond_to :html, :json, :xml
|
||||
before_action :builder_only, only: [:new, :create]
|
||||
|
||||
def new
|
||||
@correction = TagCorrection.new(params[:tag_id])
|
||||
respond_with(@correction)
|
||||
end
|
||||
|
||||
def show
|
||||
@correction = TagCorrection.new(params[:tag_id])
|
||||
respond_with(@correction)
|
||||
end
|
||||
|
||||
def create
|
||||
@correction = TagCorrection.new(params[:tag_id])
|
||||
|
||||
if params[:commit] == "Fix"
|
||||
@correction.fix!
|
||||
redirect_to tags_path(:search => {:name_matches => @correction.tag.name, :hide_empty => "no"}), :notice => "Tag will be fixed in a few seconds"
|
||||
else
|
||||
redirect_to tags_path(:search => {:name_matches => @correction.tag.name})
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user