Skip to content

Instantly share code, notes, and snippets.

@ngty
Created May 13, 2009 03:24
Show Gist options
  • Save ngty/110860 to your computer and use it in GitHub Desktop.
Save ngty/110860 to your computer and use it in GitHub Desktop.
ActionMailer::Base.class_eval do
DELIVERIES_CACHE_PATH =⋅
File.join(RAILS_ROOT,'tmp','cache','action_mailer_acceptance_deliveries.cache')
def perform_delivery_acceptance(mail)
deliveries << mail
File.open(DELIVERIES_CACHE_PATH,'w') do |f|
Marshal.dump(deliveries, f)
end
end
def self.cached_deliveries
File.open(DELIVERIES_CACHE_PATH,'r') do |f|
Marshal.load(f)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment