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:
1. Define in your config/routes.rb
resources :foos
2. Create a Controller that Inherits from Bar
class FoosController < BarsController
3. Reuse the methods you need calling super():
class FoosController < BarsController
def create
super()
end
end
Best Regards,
Everaldo
> class Foo < Bar
> end
>
>
> resources :foos ===> controller :bars
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.