From cb5255b5fce6491343784e1e9186b4c3489dddf4 Mon Sep 17 00:00:00 2001 From: Shiva Bhusal Date: Fri, 1 Jan 2016 10:31:50 +0545 Subject: [PATCH 1/4] Rename README to README.md --- README => README.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename README => README.md (100%) diff --git a/README b/README.md similarity index 100% rename from README rename to README.md From 3311e7ff8c0ba408abb19a70e0a9a945157eae4f Mon Sep 17 00:00:00 2001 From: Shiva Bhusal Date: Fri, 1 Jan 2016 10:35:19 +0545 Subject: [PATCH 2/4] Used MD syntax to make page look good --- README.md | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 2cb8f62..d43de4a 100644 --- a/README.md +++ b/README.md @@ -4,11 +4,11 @@ ExceptionLogger The Exception Logger (forgive the horrible name) logs your Rails exceptions in the database and provides a funky web interface to manage them. First you need to generate the migration: - +``` ./script/generate exception_migration - +``` Next, you'll need to include the ExceptionLoggable module into ApplicationController. Once that's done you might want to modify key methods to customize the logging: - +``` render_404(exception) - Shows the 404 template. render_500(exception) - Shows the 500 template. @@ -17,19 +17,20 @@ Next, you'll need to include the ExceptionLoggable module into ApplicationContro rescue_action_in_public(exception) - Does not log these exceptions: ActiveRecord::RecordNotFound, ActionController::UnknownController, ActionController::UnknownAction +``` Now add a new route to your routes.rb: - +```ruby map.connect "logged_exceptions/:action/:id", :controller => "logged_exceptions" +``` +After that, visit `/logged_exceptions` in your application to manage the exceptions. -After that, visit /logged_exceptions in your application to manage the exceptions. - -Once you have done that, open up the vendor/plugins/init.rb file and choose your pagination, -supported options are will_paginate, paginating_find, and simple mysql based pagination (Uses LIMIT) -The current default is none. To use the other options you need to uncomment the $PAGINATION_TYPE line +Once you have done that, open up the `vendor/plugins/init.rb` file and choose your pagination, +supported options are `will_paginate`, `paginating_find`, and simple `mysql` based pagination (Uses `LIMIT`) +The current default is none. To use the other options you need to uncomment the `$PAGINATION_TYPE` line and the require for that pagination, you should comment out what you won't use etc... -It's understandable that you may want to require authentication. Add this to your config/environments/production.rb: - +It's understandable that you may want to require authentication. Add this to your `config/environments/production.rb`: + ```ruby # config/environments/production.rb config.after_initialize do require 'application' unless Object.const_defined?(:ApplicationController) @@ -69,11 +70,12 @@ It's understandable that you may want to require authentication. Add this to yo alias_method_chain :login_required, :basic end end + ```ruby The exact code of course depends on the specific needs of your application. - +--- CREDITS - +--- Jamis Buck - original exception_notification plugin Rick Olson - model/controller code Josh Goebel - design From 1cf2b49c0bb7a1df409c53979dcb5bef28abf19d Mon Sep 17 00:00:00 2001 From: Shiva Bhusal Date: Fri, 1 Jan 2016 10:40:02 +0545 Subject: [PATCH 3/4] Used MD syntax to make page look good --- README.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index d43de4a..535246f 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@ ExceptionLogger =============== -The Exception Logger (forgive the horrible name) logs your Rails exceptions in the database and provides a funky web interface to manage them. +The **Exception Logger** (forgive the horrible name) logs your Rails exceptions in the database and provides a funky web interface to manage them. First you need to generate the migration: ``` ./script/generate exception_migration ``` -Next, you'll need to include the ExceptionLoggable module into ApplicationController. Once that's done you might want to modify key methods to customize the logging: +Next, you'll need to include the `ExceptionLoggable` module into `ApplicationController`. Once that's done you might want to modify key methods to customize the logging: ``` render_404(exception) - Shows the 404 template. @@ -30,7 +30,7 @@ The current default is none. To use the other options you need to uncomment the and the require for that pagination, you should comment out what you won't use etc... It's understandable that you may want to require authentication. Add this to your `config/environments/production.rb`: - ```ruby +```ruby # config/environments/production.rb config.after_initialize do require 'application' unless Object.const_defined?(:ApplicationController) @@ -70,12 +70,13 @@ It's understandable that you may want to require authentication. Add this to yo alias_method_chain :login_required, :basic end end - ```ruby + +``` The exact code of course depends on the specific needs of your application. ---- + CREDITS ---- +=== Jamis Buck - original exception_notification plugin Rick Olson - model/controller code Josh Goebel - design From 0fd571c34e74c1950439a2bcfc404f29ca23bb6f Mon Sep 17 00:00:00 2001 From: Shiva Bhusal Date: Fri, 1 Jan 2016 10:40:38 +0545 Subject: [PATCH 4/4] Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 535246f..018af3d 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ The exact code of course depends on the specific needs of your application. CREDITS === -Jamis Buck - original exception_notification plugin -Rick Olson - model/controller code -Josh Goebel - design -Jason Knight - Pagination support, built on/inspired by Ryanb's willpaginate support. +Jamis Buck - original exception_notification plugin +Rick Olson - model/controller code +Josh Goebel - design +Jason Knight - Pagination support, built on/inspired by Ryanb's willpaginate support.