Skip to content
Browse files

Any request to tags redirect to categories

Remove ability to make json request. We have the content api so there's no need for this anymore. 

Removing redundant controller code, we will be writing a proper tag admin.
  • Loading branch information...
1 parent fa6663d commit 751c05af3adbfa630062ac7babfcb6f6ac9c6060 Mazz Mosley committed Oct 25, 2012
Showing with 2 additions and 14 deletions.
  1. +2 −13 app/controllers/tags_controller.rb
  2. +0 −1 config/routes.rb
View
15 app/controllers/tags_controller.rb
@@ -1,19 +1,8 @@
class TagsController < ApplicationController
- respond_to :json, :html
+ respond_to :html
def index
- @tags = TagRepository.load_all(tag_type: params[:type])
- respond_with(status: 'ok', total: @tags.count, from: 0, to: @tags.count - 1,
- pagesize: @tags.count, results: @tags)
- end
-
- def show
- @tag = TagRepository.load(params[:id])
- if @tag
- respond_with(status: 'ok', tag: @tag)
- else
- head :not_found
- end
+ redirect_to categories_path
end
def edit
View
1 config/routes.rb
@@ -2,7 +2,6 @@
resources :artefacts, :constraints => { :id => /[^\.]+/ }
resources :tags
- match 'tags/:id' => 'tags#show', :id => /[^\.]+/, :defaults => {:format => 'json'}
match 'categories' => 'tags#categories', :as => :categories
match 'google_insight' => 'seo#show'
match 'curated_list' => 'curated_list#import', :as => :curated_list

0 comments on commit 751c05a

Please sign in to comment.
Something went wrong with that request. Please try again.