Forum: Ruby on Rails Include another action

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
93e9140516b1193360ae44a1373fc81b?d=identicon&s=25 jegt (Guest)
on 2005-11-22 16:58
(Received via mailing list)
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
37cd9fe97b7052796e21767ed34859a7?d=identicon&s=25 todd (Guest)
on 2005-11-22 17:46
(Received via mailing list)
> 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/ActionControlle...



--

________________________________
toddgrimason*todd[ at ]slack.net
05d703f649ef1d07e78d7b479fb4c4ac?d=identicon&s=25 james.adam (Guest)
on 2005-11-22 17:58
(Received via mailing list)
Have you looked at render_to_string ?

- james
93e9140516b1193360ae44a1373fc81b?d=identicon&s=25 jegt (Guest)
on 2005-11-22 22:08
(Received via mailing list)
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/ActionControlle...

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
37cd9fe97b7052796e21767ed34859a7?d=identicon&s=25 todd (Guest)
on 2005-11-22 22:16
(Received via mailing list)
>>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/ActionControlle...
>
> 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/co...

or

http://rubyurl.com/Qej



--

________________________________
toddgrimason*todd[ at ]slack.net
This topic is locked and can not be replied to.