Skip to content

Instantly share code, notes, and snippets.

@cbrunsdon
Created May 31, 2013 18:47
Show Gist options
  • Save cbrunsdon/5687067 to your computer and use it in GitHub Desktop.
Save cbrunsdon/5687067 to your computer and use it in GitHub Desktop.
My nested routes don't play nicely with my namespaces
class Foo::Bar < ActiveRecord::Base
end
class Foo::Bar::Lols < ActiveRecord::Base
end
Routes.draw do
namespace :foo do
resources :bars do
resources :lols
end
end
end
foo_bars_lols_path <-- created by the routes
@bar = Foo::Bar.new
@lols = Foo::Bar::Lols.new
link_to 'Link', [@bar, @lols] <-- foo_bar_foo_bar_lols
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment