Skip to content

Instantly share code, notes, and snippets.

@shoe
Created September 4, 2009 22:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shoe/181198 to your computer and use it in GitHub Desktop.
Save shoe/181198 to your computer and use it in GitHub Desktop.
commit 036a3ed9bc2778f6931a2039df309a7178fcf7e1
Author: Chris Shoemaker <chris.shoemaker@cox.net>
Date: Fri Aug 14 17:28:19 2009 -0400
Fix the clearance route precedence hack to account for reloading.
diff --git a/vendor/gems/thoughtbot-clearance-0.6.9/lib/clearance/extensions/rou
index 1a6c43b..6581346 100755
--- a/vendor/gems/thoughtbot-clearance-0.6.9/lib/clearance/extensions/routes.rb
+++ b/vendor/gems/thoughtbot-clearance-0.6.9/lib/clearance/extensions/routes.rb
@@ -3,9 +3,8 @@ if defined?(ActionController::Routing::RouteSet)
def load_routes_with_clearance!
lib_path = File.dirname(__FILE__)
clearance_routes = File.join(lib_path, *%w[.. .. .. config clearance_rout
- unless configuration_files.include?(clearance_routes)
- add_configuration_file(clearance_routes)
- end
+ configuration_files.delete(clearance_routes)
+ add_configuration_file(clearance_routes)
load_routes_without_clearance!
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment