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”
Hi!
On Mon, Sep 19, 2011 at 10:57 AM, slava [email protected] wrote:
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 M. wrote in post #1022739:
Hello,
I wonder how to tell my routes.rb to route requests to a resource to
it’s parent controllerclass Foo < Bar
endresources :foos ===> controller :bars
resources :foos, :controller => :bars
For what purpose would you need to route to a parent controller?
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs