diff --git a/README b/README index 941334e..7d8436d 100644 --- a/README +++ b/README @@ -8,6 +8,7 @@ Dependencies: * Haml / Sass * Merb Helpers * Merb Has Flash + * newbamboo Merb Exceptions * Recaptcha account Released under GNU GPLv2 diff --git a/app/controllers/exceptions.rb b/app/controllers/exceptions.rb index 5bae591..c3fb590 100644 --- a/app/controllers/exceptions.rb +++ b/app/controllers/exceptions.rb @@ -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 \ No newline at end of file diff --git a/config/init.rb b/config/init.rb index 651cb20..451eff5 100644 --- a/config/init.rb +++ b/config/init.rb @@ -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' diff --git a/config/plugins.yml b/config/plugins.yml new file mode 100644 index 0000000..e0b5e7e --- /dev/null +++ b/config/plugins.yml @@ -0,0 +1,5 @@ +:exceptions: + :app_name: BinaryAttraction + :email_from: exceptions@binaryattraction.com + :email_addresses: + - webmaster@binaryattraction.com \ No newline at end of file