class Forum::ForumUserImagesController < ApplicationController

  
  before_filter :auth_fuser
  



  def create
  
    @forum_user_image = ForumUserImage.new(:image =>params[:files][0])
    @forum_user_image.forum_user = current_fuser
    @forum_user_image.save
      
    
  end

  
  		


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

  end


	def rotate
		deg = params[:direction] == "right" ? -90 : 90
		
		@forum_user_image = ForumUserImage.find(params[:id])
		@forum_user_image.rotate(deg)
	end

end
