Skip to content

Instantly share code, notes, and snippets.

@faucct
Created July 19, 2014 13:36
Show Gist options
  • Save faucct/2bbe53c8f450b75a88b5 to your computer and use it in GitHub Desktop.
Save faucct/2bbe53c8f450b75a88b5 to your computer and use it in GitHub Desktop.
class Record < ActiveRecord::Base
def self.process_records
all.each do |record|
begin
record.do_something
rescue
ErrorMailer.email(record).deliver
end
end
end
def do_something
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment