Skip to content

Instantly share code, notes, and snippets.

@thoughtbot
Created August 4, 2009 22:28
Show Gist options
  • Save thoughtbot/162324 to your computer and use it in GitHub Desktop.
Save thoughtbot/162324 to your computer and use it in GitHub Desktop.
class ActionController::Routing::RouteSet
def load_routes_with_clearance!
clearance_routes = File.join(File.dirname(__FILE__),
*%w[.. config clearance_routes.rb])
unless configuration_files.include? clearance_routes
add_configuration_file(clearance_routes)
end
load_routes_without_clearance!
end
alias_method_chain :load_routes!, :clearance
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment