Skip to content

Instantly share code, notes, and snippets.

@TXDynamics
Last active December 16, 2015 12:49
Show Gist options
  • Save TXDynamics/5437450 to your computer and use it in GitHub Desktop.
Save TXDynamics/5437450 to your computer and use it in GitHub Desktop.
Creating Rails custom URLS
# Creating better Routes. In rails you match the URI to the controller
# and then the action within the controller, this allows you to make bases URLs
# This creates a route that can also be referenced within code as the following
# contact_path = /contact
# contact_url = http://localhost/contact/
match '/contact', to 'static_pages#contact'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment