From 47e500c7abd1927417ab7eeace8e445245e15648 Mon Sep 17 00:00:00 2001 From: Gyuri Schreiber Date: Sat, 19 Feb 2011 12:45:36 +0100 Subject: [PATCH] updated to get templates to work with rails3 --- lib/exception_notifier/notifier.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/exception_notifier/notifier.rb b/lib/exception_notifier/notifier.rb index 01234f43..f9b315aa 100644 --- a/lib/exception_notifier/notifier.rb +++ b/lib/exception_notifier/notifier.rb @@ -4,6 +4,8 @@ class ExceptionNotifier class Notifier < ActionMailer::Base self.mailer_name = 'exception_notifier' + # templates work for rails 3.0.3, likely work for 2.x (haven't tested) + self.append_view_path Rails.root.nil? ? "app/views" : "#{Rails.root}/app/views" if defined?(Rails) self.append_view_path "#{File.dirname(__FILE__)}/views" class << self