adding exception notification support
parent
1956ea03be
commit
08a199c160
1
README
1
README
|
@ -8,6 +8,7 @@ Dependencies:
|
|||
* Haml / Sass
|
||||
* Merb Helpers
|
||||
* Merb Has Flash
|
||||
* newbamboo Merb Exceptions
|
||||
* Recaptcha account
|
||||
|
||||
Released under GNU GPLv2
|
||||
|
|
|
@ -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
|
|
@ -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'
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
:exceptions:
|
||||
:app_name: BinaryAttraction
|
||||
:email_from: exceptions@binaryattraction.com
|
||||
:email_addresses:
|
||||
- webmaster@binaryattraction.com
|
Reference in New Issue