thoughtbot/griddler — pull request #179 by dommmel (2014-10-14 14:58:20+00:00)
Title: fix error on empty body (mandrill)

The following error occurred with rails Rails 4.2.0.beta2 and mandrill when using an empty email body.

```
NoMethodError (undefined method `valid_encoding?' for nil:NilClass):
/home.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/griddler-1.1.0/lib/griddler/email.rb:75:in `clean_invalid_utf8_bytes'
/home.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/griddler-1.1.0/lib/griddler/email.rb:64:in `clean_text'
/home.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/griddler-1.1.0/lib/griddler/email.rb:59:in `text_or_sanitized_html'
/home.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/griddler-1.1.0/lib/griddler/email.rb:47:in `extract_body'
/home.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/griddler-1.1.0/lib/griddler/email.rb:16:in `initialize'
/home.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/griddler-1.1.0/app/controllers/griddler/emails_controller.rb:4:in `new'
/home.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/griddler-1.1.0/app/controllers/griddler/emails_controller.rb:4:in `block in create'
/home.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/griddler-1.1.0/app/controllers/griddler/emails_controller.rb:3:in `each'
/home.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/griddler-1.1.0/app/controllers/griddler/emails_controller.rb:3:in `create'
/home.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/actionpack-4.2.0.beta2/lib/action_controller/metal/implicit_render.rb:4:in `send_action'

```