@@ -49,8 +49,21 @@ access to the following variables:
4949You can reorder the sections, or exclude sections completely, by altering the
5050ExceptionNotifier.sections variable. You can even add new sections that
5151describe application-specific data--just add the section's name to the list
52- (whereever you'd like), and define the corresponding partial. Then, if your
53- new section requires information that isn't available by default, make sure
52+ (wherever you'd like), and define the corresponding partial. 
53+    
54+     #Example with two sections new sections added 
55+     Whatever::Application.config.middleware.use ExceptionNotifier, 
56+ 	   :email_prefix => "[Whatever] ", 
57+ 	   :sender_address => %{"notifier" <[email protected] >},  58+ 	   :exception_recipients => %w{[email protected] },  59+ 	   :sections => %w{my_section1 my_section2} + ExceptionNotifier::Notifier.default_sections 
60+ 
61+ When you add a new section or customize a section, you need to inform the gem where the views are.
62+ Create an initializer called config/initializers/exception_notifier.rb with the following code:
63+ 
64+     ExceptionNotifier::Notifier.prepend_view_path File.join(Rails.root, 'app/views')	 
65+ 
66+ If your new section requires information that isn't available by default, make sure
5467it is made available to the email using the exception_data macro:
5568
5669    class ApplicationController < ActionController::Base 
0 commit comments