def create File.open("#{RAILS_ROOT}/public/uploaded_images/#{params['title']}.jpg", "wb") do |f| f.write(@params['picture_file'].read) end image = Image.new image.title = params['title'] image.image_url = params['title'] if image.save! redirect_to :action => "list" end end