updated readme

This commit is contained in:
Mike Kelley
2011-08-27 01:41:48 -06:00
commit 17fee3c6d5
98 changed files with 11421 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
class ForumsController < ApplicationController
load_and_authorize_resource :category
load_and_authorize_resource :forum, :through => :category, :shallow => true
def create
if @forum.save
flash[:notice] = "Forum was successfully created."
redirect_to forums_url
else
render :action => 'new'
end
end
def update
if @forum.update_attributes(params[:forum])
flash[:notice] = "Forum was updated successfully."
redirect_to forum_url(@forum)
end
end
def destroy
if @forum.destroy
flash[:notice] = "Category was deleted."
redirect_to forums_url
end
end
end