class Forum::ForumUsersController < ApplicationController
  layout "forum"
  
  before_filter :auth_fuser
  
  def index
    
    @users = ForumUser.all
  end


  def show
    @user = ForumUser.find(params[:id])

  end


  def new
    @user = ForumUser.new
  
  end

  def edit
    @user = ForumUser.find(params[:id])
  
  end

  def create
  	@user = ForumUser.new(params[:forum_user])
    
    if @user.save
      redirect_to forum_forum_users_path
          
  	else
  		render :action => "new" 
  	end
  end

  def update
  	@user = ForumUser.find(params[:id])
    
    if @user.update_attributes(params[:forum_user])
      redirect_to forum_forum_user_path(@user)
          
  	else
  		render :action => "edit" 
  	end
    
  end
  		


  def destroy
  	@user = ForumUser.find(params[:id])
	  @user.destroy
    redirect_to forum_forum_users_path

  end



end
