On 7/11/06, Scott Walter <tx_scottwalter@yahoo.com>
wrote:>
> Hi,
>
> I''m developing a dashboard like page and basically want to combine
the
> result of multiple actions on a page. I''ve done this so far:
>
> def index
> r1 = render_to_string :action => "action1"
> r2 = render_to_string :action => "action2"
>
> render :text => r1+r2
> end
>
> This works, but now I want to render from other controllers and this is
> where I''m stuck. So in my current controller lets call it
"Dashboard", I
> want to render content from a controller called "HumanResources"
and another
> controller called "Marketing". I tried this:
>
> def index
> r1 = render_to_string :action => "human_resources/action"
> r2 = render_to_string :action => "marketing/action"
>
> render :text => r1+r2
> end
>
> This doesn''t work. Any ideas on how from one controller I can get
the
> output of another controller and include it in the calling controllers
> output.
>
> Thanks in advance, scott.
>
I''ve never used this method, but in the docs it says it works like a
normal
call to render, and just returns to a string instead of to a browser.
That being the case, would a standard url_for type hash work
r1 = render_to_string :controller => ''human_resources'',
:action => ''action''
Don''t know tho...
_______________________________________________> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://wrath.rubyonrails.org/pipermail/rails/attachments/20060711/f31b2872/attachment.html