Skip to content

Instantly share code, notes, and snippets.

@blasterpal
Last active August 29, 2015 14:18
Show Gist options
  • Select an option

  • Save blasterpal/578e59ce03d55cf3e55e to your computer and use it in GitHub Desktop.

Select an option

Save blasterpal/578e59ce03d55cf3e55e to your computer and use it in GitHub Desktop.
Programmatically print Rails routes
Rails.application.routes.routes.each do |route|
puts route.path.spec.to_s
end;nil
# specs with stubbed routes: https://github.com/blakechambers/matterhorn/blob/master/spec/support/url_test_helpers.rb
routes.routes.each do |route|
puts route.path.spec.to_s
end;nil
Rails.application.routes.named_routes.helpers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment