Include another action

Hi

Is there some way in Rails to include (the output of) another action
in a page? What I am looking for is something like
RequestDispatcher.include() in Java.

/ Jonas

Is there some way in Rails to include (the output of) another action
in a page? What I am looking for is something like
RequestDispatcher.include() in Java.

I believe that’s the intention of components:

http://api.rubyonrails.com/classes/ActionController/Components.html


toddgrimason*todd[ at ]slack.net

On 22 nov 2005, at 17.43, Todd Grimason wrote:

Is there some way in Rails to include (the output of) another action
in a page? What I am looking for is something like
RequestDispatcher.include() in Java.

I believe that’s the intention of components:

Peak Obsession

Yes, that is exactly what I was looking for. I wasn’t even looking
there since I thought it was only for the stuff in the components-dir.

Thanks.

/ Jonas

Is there some way in Rails to include (the output of) another action

in a page? What I am looking for is something like
RequestDispatcher.include() in Java.

I believe that’s the intention of components:

Peak Obsession

Yes, that is exactly what I was looking for. I wasn’t even looking
there since I thought it was only for the stuff in the components-dir.

keep in mind though:

http://railsexpress.de/blog/articles/2005/11/18/components-may-not-be-evil-but-they-sure-can-be-slow

or

http://rubyurl.com/Qej


toddgrimason*todd[ at ]slack.net

Have you looked at render_to_string ?

  • james