Skip to content

Instantly share code, notes, and snippets.

@traviskroberts
Forked from dhh/gist:2492118
Last active October 3, 2015 17:58
Show Gist options
  • Save traviskroberts/2499845 to your computer and use it in GitHub Desktop.
Save traviskroberts/2499845 to your computer and use it in GitHub Desktop.
Route Organization
class ActionDispatch::Routing::Mapper
def draw(routes_name)
instance_eval(File.read(Rails.root.join("config/routes/#{routes_name}_routes.rb")))
end
end
BCX::Application.routes.draw do
draw :admin
draw :frontend
draw :resources
root :to => 'site#index'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment