Created
May 31, 2013 18:47
-
-
Save cbrunsdon/5687067 to your computer and use it in GitHub Desktop.
My nested routes don't play nicely with my namespaces
This file contains hidden or 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
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