From 5ae1f8a63438ed77e260ba6b44572ea39933b6ac Mon Sep 17 00:00:00 2001 From: albert Date: Mon, 8 Apr 2013 14:13:04 -0400 Subject: [PATCH] fix tag correction display for remote servers --- app/controllers/tag_corrections_controller.rb | 4 ++++ app/views/tag_corrections/show.json.erb | 1 + config/routes.rb | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 app/views/tag_corrections/show.json.erb diff --git a/app/controllers/tag_corrections_controller.rb b/app/controllers/tag_corrections_controller.rb index 1959e4556..0c6511e1f 100644 --- a/app/controllers/tag_corrections_controller.rb +++ b/app/controllers/tag_corrections_controller.rb @@ -4,6 +4,10 @@ class TagCorrectionsController < ApplicationController def new @correction = TagCorrection.new(params[:tag_id]) end + + def show + @correction = TagCorrection.new(params[:tag_id]) + end def create @correction = TagCorrection.new(params[:tag_id]) diff --git a/app/views/tag_corrections/show.json.erb b/app/views/tag_corrections/show.json.erb new file mode 100644 index 000000000..65fa82d7a --- /dev/null +++ b/app/views/tag_corrections/show.json.erb @@ -0,0 +1 @@ +<%= raw @correction.to_json %> diff --git a/config/routes.rb b/config/routes.rb index c61cf80d7..e8f6e47c6 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -156,7 +156,7 @@ Danbooru::Application.routes.draw do end resource :source, :only => [:show] resources :tags do - resource :correction, :only => [:new, :create], :controller => "TagCorrections" + resource :correction, :only => [:new, :create, :show], :controller => "TagCorrections" collection do get :search end