Hello, I wonder how to tell my routes.rb to route requests to a resource to it's parent controller
class Foo < Bar end
resources :foos ===> controller :bars
Hello, I wonder how to tell my routes.rb to route requests to a resource to it's parent controller
class Foo < Bar end
resources :foos ===> controller :bars
Check out the guide for routing, especially the part on “specifying a controller to use” under “customizing restful resources”
http://guides.rubyonrails.org/routing.html#customizing-resourceful-routes
Hi!
Hello,
I wonder how to tell my routes.rb to route requests to a resource to
it’s parent controller
I don’t know if what I will say is the “Rails Way”, but maybe you can try:
resources :foos
class FoosController < BarsController
class FoosController < BarsController
def create
super()
end
end
Best Regards,
Everaldo
Slava Mikerin wrote in post #1022739:
Hello, I wonder how to tell my routes.rb to route requests to a resource to it's parent controller
class Foo < Bar end
resources :foos ===> controller :bars
resources :foos, :controller => :bars