Created
February 5, 2013 15:31
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class EmailProcessor | |
def self.process(email) | |
Post.create!({ body: email.body, email: email.from }) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
FYI - I don't think this works anymore. I keep getting a ArgumentError. The griddler gem docs say to have an initialize method for the EmailProcessor class and a regular (non-class) process method that takes no arguments. If I'm correct, you may want to update this blog article - http://sendgrid.com/blog/receiving-email-in-your-rails-app-with-griddler/