adding exception notification support

master
Coleman 2008-10-17 02:51:13 -05:00
parent 1956ea03be
commit 08a199c160
4 changed files with 9 additions and 4 deletions

1
README
View File

@ -8,6 +8,7 @@ Dependencies:
* Haml / Sass
* Merb Helpers
* Merb Has Flash
* newbamboo Merb Exceptions
* Recaptcha account
Released under GNU GPLv2

View File

@ -1,10 +1,9 @@
class Exceptions < Application
# handle NotFound exceptions (404)
def not_found
do_your_render_thing
end
# handle NotAcceptable exceptions (406)
def not_acceptable
do_your_render_thing
@ -16,8 +15,7 @@ class Exceptions < Application
if request.xhr?
render :format => :html, :layout => false
else
render :format => :html
render_and_notify :format => :html
end
end
end

View File

@ -3,6 +3,7 @@ Gem.path.unshift(Merb.root / "gems")
$LOAD_PATH.unshift(Merb.root / "lib")
dependencies 'haml', 'sass', 'merb_helpers', 'merb_has_flash', 'digest/sha1', 'merb-mailer', 'recaptcha'
require 'merb_exceptions'
require 'RMagick'
require 'memcache'
require 'memcache_util'

5
config/plugins.yml Normal file
View File

@ -0,0 +1,5 @@
:exceptions:
:app_name: BinaryAttraction
:email_from: exceptions@binaryattraction.com
:email_addresses:
- webmaster@binaryattraction.com