Rename /category/xyz paths to /c/xyz -- @SamSaffron did most of the

work even though I'm merging the patch!
This commit is contained in:
Robin Ward
2014-10-16 12:15:31 -04:00
parent 8bb20f2260
commit d2ac5a9ac6
15 changed files with 74 additions and 68 deletions

View File

@ -2,9 +2,13 @@ require_dependency 'category_serializer'
class CategoriesController < ApplicationController
before_filter :ensure_logged_in, except: [:index, :show]
before_filter :ensure_logged_in, except: [:index, :show, :redirect]
before_filter :fetch_category, only: [:show, :update, :destroy]
skip_before_filter :check_xhr, only: [:index]
skip_before_filter :check_xhr, only: [:index, :redirect]
def redirect
redirect_to "/c/#{params[:path]}"
end
def index
@description = SiteSetting.site_description