jpw
jpw

Reputation: 19247

for rails actionmailer, any way to debug ActionView::Template::Error errors?

In my rails 3.1 app, I do have

config.action_mailer.raise_delivery_errors = true

in my development.rb file (and, yes, have restarted by local dev server since changing that to true).

However, as I develop new email templates and run into the occasional ActionView::Template::Error I'm not seeing any of the debugging info being put out as to which line threw the error. (As opposed to when one of my normal app views has a problem the log shows the snippet of the haml source with the problem).

IS there a way to turn on similar debugging messages for mailers?

Upvotes: 5

Views: 1004

Answers (1)

Tyrel Richey
Tyrel Richey

Reputation: 867

I use rails console instead of making a web request to test action mailer. It will gives a-lot more info if an error ocures.

$ rails c
> MyMailer::maielr_name( var1, var2 ).deliver!

Upvotes: 2

Related Questions