sighmon / mjml-rails

MJML + ERb/Haml/Slim view template
https://mjml.io
Other
301 stars 65 forks source link

Register the MIME type as an alias #9

Closed tylerhunt closed 8 years ago

tylerhunt commented 8 years ago

Avoid overriding the existing text/html MIME type by registering the MJML type as an alias.

This should address the issues brought up in #5, and also resolves an issue I've had with an uptime monitoring servicing making requests with an Accept: text/html header causing 500 errors in the application due to a "missing template":

ActionView::MissingTemplate Missing template home/index, application/index with {:locale=>[:en], :formats=>[:mjml], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :coffee, :arb, :haml, :mjml]}.

sighmon commented 8 years ago

@tylerhunt Nice, thanks Tyler. 👍

tylerhunt commented 8 years ago

@sighmon Thanks for the quick release!