Cleaned up catergory forum
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user