Cleaned up catergory forum

This commit is contained in:
2013-01-22 11:15:58 -05:00
parent 9cdcf46bf7
commit f17245bae1
2 changed files with 17 additions and 25 deletions

View File

@@ -1,5 +1,7 @@
class CategoriesController < ApplicationController
load_and_authorize_resource :category
before_filter :check_for_cancel
def create
if @category.save
@@ -23,4 +25,10 @@ class CategoriesController < ApplicationController
redirect_to forums_url
end
end
end
def check_for_cancel
if params[:commit] == 'cancel'
redirect_to forums_path
end
end
end