forked from smartinez87/exception_notification
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request smartinez87#27 from amishyn/master
set verbose subject from options fix
- Loading branch information
Showing
3 changed files
with
26 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ class << self | |
attr_writer :default_exception_recipients | ||
attr_writer :default_email_prefix | ||
attr_writer :default_sections | ||
attr_writer :default_verbose_subject | ||
|
||
def default_sender_address | ||
@default_sender_address || %("Exception Notifier" <[email protected]>) | ||
|
@@ -30,13 +31,17 @@ def default_email_prefix | |
def default_sections | ||
@default_sections || %w(request session environment backtrace) | ||
end | ||
|
||
def default_verbose_subject | ||
@default_verbose_subject.nil? || @default_verbose_subject | ||
end | ||
|
||
def default_options | ||
{ :sender_address => default_sender_address, | ||
:exception_recipients => default_exception_recipients, | ||
:email_prefix => default_email_prefix, | ||
:sections => default_sections, | ||
:verbose_subject => true } | ||
:verbose_subject => default_verbose_subject } | ||
end | ||
end | ||
|
||
|
@@ -58,7 +63,6 @@ def exception_notification(env, exception) | |
data.each do |name, value| | ||
instance_variable_set("@#{name}", value) | ||
end | ||
|
||
subject = compose_subject(exception, @kontroller) | ||
|
||
mail(:to => @options[:exception_recipients], :from => @options[:sender_address], :subject => subject) do |format| | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters