#---
# 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 MessagesController < ApplicationController
  upload_status_for :save
  def custom_status
   render :inline => "<%= upload_progress.completed_percent rescue 0 %> % complete", :layout => false
  end      

  def save
#    File.open(File.join(
#                RAILS_ROOT, 
#                "public", 
#                "images", 
#                params[:picture].original_filename), 
#              "wb") do |f|
#      f.write(params[:picture].read)
#    end               
                        
  end

  def new
    @message = Message.new
  end     

end