Created
July 22, 2019 01:19
-
-
Save yuki24/facbed1aee2098d80250eee486e3314b to your computer and use it in GitHub Desktop.
Rails routes AST access
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Run this with `rails runner route_ast.rb` | |
# | |
Rails.application.routes.routes.each do |route| | |
ast = route.ast | |
# do stuff with AST... | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment