Skip to content

Instantly share code, notes, and snippets.

@ahoward
Created April 3, 2015 22:34
Show Gist options
  • Select an option

  • Save ahoward/7cef59ce74593b79ab31 to your computer and use it in GitHub Desktop.

Select an option

Save ahoward/7cef59ce74593b79ab31 to your computer and use it in GitHub Desktop.
root :to => 'communities#index', :as => :root
scoped_community_routes = proc do
resources :topics do
end
resources :replies do
end
resources :profiles do
end
end
instance_eval(&scoped_community_routes)
resources :communities do
end
scope ':community' do
match '' => 'communities#show'
match '/' => 'communities#show'
instance_eval(&scoped_community_routes)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment