Hi, you can do the following:
class BController < ActionController::Base
def create( ... )
...
end
end
class AController < ActionController::Base
def example_method
b_controller = BController.new
b_controller.create( ... )
end
end
For additional examples of OOP in Ruby, please consult any of the available
Ruby books.
Good luck,
-Conrad
On 8/28/07, eggie5 <eggie5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:>
>
> How do I call the create method of b_controller from a_controller?
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---