want to delete all cookies

I am looking to delete all cookies that I set when a user logs out of my application.

   def logout
     for cook in cookies
       cookies.delete cook[0]
     end
     redirect_to '/'
   end

does not seem to be doing the trick. Even though it looks right in my log file the cookies don't actually expire. Any ideas?

Thank you,
Matt Margolis

I am looking to delete all cookies that I set when a user logs out of
my application.

  def logout
    for cook in cookies
      cookies.delete cook[0]
    end
    redirect_to '/'
  end

does not seem to be doing the trick. Even though it looks right in my
log file the cookies don't actually expire. Any ideas?

This works for me...

cookies.to_hash.each_pair do |k, v|
   cookies[k.to_sym] = { :value => '',
                         :path => '/',
                         :domain => '.domain.com',
                         :expire => 1.day.ago }
end

redirect_to '/'