Include another action


#1

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


#2

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


#3

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:

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

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


#4

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

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


#5

Have you looked at render_to_string ?

  • james