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.
jegt (Guest)
on 2005-11-22 17: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
todd (Guest)
on 2005-11-22 18: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
james.adam (Guest)
on 2005-11-22 18:58
(Received via mailing list)
Have you looked at render_to_string ?

- james
jegt (Guest)
on 2005-11-22 23: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
todd (Guest)
on 2005-11-22 23: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.