adding exception notification support

master
Coleman 2008-06-29 16:19:52 -05:00
parent 3bb7604e9c
commit 27443066a4
3 changed files with 13 additions and 2 deletions

View File

@ -1,15 +1,17 @@
class Exceptions < Application
include MerbExceptions::ControllerExtensions
# handle NotFound exceptions (404)
def not_found
@page_title = 'Error 404'
@secondary_title = 'Document Not Found'
render :format => :html
render_and_notify :format => :html
end
# handle NotAcceptable exceptions (406)
def not_acceptable
@page_title = 'Error 500'
@secondary_title = 'Application Exception'
render :format => :html
render_and_notify :format => :html
end
end

View File

@ -11,6 +11,7 @@ use_orm :activerecord
use_test :rspec
dependencies 'merb_helpers', 'merb_has_flash', 'merb-mailer'
require 'merb_exceptions'
require 'redcloth'
require 'RMagick'
require 'memcache'
@ -24,4 +25,7 @@ Merb::BootLoader.after_app_loads do
memcache_connection_str = 'localhost:11211'
end
CACHE = MemCache.new memcache_connection_str
Merb::Mailer.config = { :sendmail_path => '/usr/sbin/sendmail' }
Merb::Mailer.delivery_method = :sendmail
end

View File

@ -0,0 +1,5 @@
:exceptions:
:app_name: TuxBliki
:email_from: exceptions@penguincoder.org
:email_addresses:
- webmaster@penguincoder.org