Created
July 24, 2015 15:55
-
-
Save chsh/137afbf8d91a00dbf441 to your computer and use it in GitHub Desktop.
Get Rails routes list from own application.
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
# note: This code does not point correct paths on "initializer". | |
# Use after all initialization process are completed. | |
# | |
class GetRoutePaths | |
def self.list | |
@@list ||= Rails.application.routes.routes.map { |r| r.path.spec.to_s }.uniq | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment