Class names are CamelCase.
Methods and variables are snake_case.
Methods with a ? suffix will return a boolean.
| class EmailAddressFilter | |
| def self.delivering_email(message) | |
| message.perform_deliveries = false | |
| # Remove email from message.to if email is on the unsubscribe list | |
| tos = message.to.to_a | |
| message.to.each do |email| | |
| tos.delete(email) if Unsubscribe.find_by_email(email) | |
| end | |
| message.to = tos # can't delete directly from message.to. probably a better way to do this... |