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
Have you looked at render_to_string ? - james On 11/22/05, Todd Grimason <todd-cwT7Wi5Y1r1eoWH0uzbU5w@public.gmane.org> 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 > > > > -- > > ________________________________ > toddgrimason*todd[ at ]slack.net > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
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.htmlYes, 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: > > > >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