adding exception notification support
parent
1956ea03be
commit
08a199c160
1
README
1
README
|
@ -8,6 +8,7 @@ Dependencies:
|
||||||
* Haml / Sass
|
* Haml / Sass
|
||||||
* Merb Helpers
|
* Merb Helpers
|
||||||
* Merb Has Flash
|
* Merb Has Flash
|
||||||
|
* newbamboo Merb Exceptions
|
||||||
* Recaptcha account
|
* Recaptcha account
|
||||||
|
|
||||||
Released under GNU GPLv2
|
Released under GNU GPLv2
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
class Exceptions < Application
|
class Exceptions < Application
|
||||||
|
|
||||||
# handle NotFound exceptions (404)
|
# handle NotFound exceptions (404)
|
||||||
def not_found
|
def not_found
|
||||||
do_your_render_thing
|
do_your_render_thing
|
||||||
end
|
end
|
||||||
|
|
||||||
# handle NotAcceptable exceptions (406)
|
# handle NotAcceptable exceptions (406)
|
||||||
def not_acceptable
|
def not_acceptable
|
||||||
do_your_render_thing
|
do_your_render_thing
|
||||||
|
@ -16,8 +15,7 @@ class Exceptions < Application
|
||||||
if request.xhr?
|
if request.xhr?
|
||||||
render :format => :html, :layout => false
|
render :format => :html, :layout => false
|
||||||
else
|
else
|
||||||
render :format => :html
|
render_and_notify :format => :html
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
|
@ -3,6 +3,7 @@ Gem.path.unshift(Merb.root / "gems")
|
||||||
$LOAD_PATH.unshift(Merb.root / "lib")
|
$LOAD_PATH.unshift(Merb.root / "lib")
|
||||||
|
|
||||||
dependencies 'haml', 'sass', 'merb_helpers', 'merb_has_flash', 'digest/sha1', 'merb-mailer', 'recaptcha'
|
dependencies 'haml', 'sass', 'merb_helpers', 'merb_has_flash', 'digest/sha1', 'merb-mailer', 'recaptcha'
|
||||||
|
require 'merb_exceptions'
|
||||||
require 'RMagick'
|
require 'RMagick'
|
||||||
require 'memcache'
|
require 'memcache'
|
||||||
require 'memcache_util'
|
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