#---
# Excerpted from "Rails Recipes"
# We make no guarantees that this code is fit for any purpose. 
# Visit http://www.pragmaticprogrammer.com/titles/fr_rr for more book information.
#---
class ImagesController < ApplicationController

  def new
	  @images = Image.find :all
	  @image = Image.new
  end
	
	def create
	  @image = Image.create(params[:image])
		redirect_to :action => 'new'
	end
	
	def clean
	  Image.destroy_all
		redirect_to :action => 'new'
	end
	
end
