Last active
August 29, 2015 14:24
-
-
Save matisojka/3dd7d7df19a5ca0a6835 to your computer and use it in GitHub Desktop.
Splitting routes into modules
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
YourApplication::Application.routes.draw do | |
root to: 'home#index' | |
get '/about' | |
get '/login' => 'application#login' | |
end | |
ADDITIONAL_ROUTES = [:messages, :orders, :api, :admin] | |
ADDITIONAL_ROUTES.each do |route_file| | |
require "#{Rails.root}/config/routes/#{route_file}" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment