Skip to content

Instantly share code, notes, and snippets.

@dmitry
Forked from nordringrayhide/routes.rake
Created December 27, 2012 10:09
Show Gist options
  • Save dmitry/4387080 to your computer and use it in GitHub Desktop.
Save dmitry/4387080 to your computer and use it in GitHub Desktop.
namespace :routes do
desc "Writes doc/routes.html. Requires Graphviz (dot)"
task :visualizer => :environment do
File.open(Rails.root.join('doc', 'routes.html'), 'wb') do |f|
f.write Rails.application.routes.router.visualizer
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment