Created
October 22, 2008 19:21
-
-
Save joshuaclayton/18759 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# This could be used to generate a list of first-order URLs that should be unavailable | |
# to a model if you're going to follow the routing convention of site.com/:slug | |
# Obviously, if you namespace the site, you're going to want to modify the index of 'segments' | |
ActionController::Routing::Routes.routes.map {|c| c.segments[1].value if c.segments[1]}.compact.uniq |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment