# Controller call with "process" fails

**URL:** <https://www.ruby-forum.com/t/controller-call-with-process-fails/92118>\
**Category:** Rails\
**Created:** [April 16, 2007, 11:17am UTC](https://www.ruby-forum.com/t/controller-call-with-process-fails/92118 "2007-04-16T11:17:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![caefer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e36b37/32.png) [@caefer](https://www.ruby-forum.com/u/caefer)\
**Post date:** [April 16, 2007, 11:17am UTC](https://www.ruby-forum.com/t/controller-call-with-process-fails/92118/1 "2007-04-16T11:17:33Z")

</div>

Hi Folks,

I have a active\_scaffold based controller that should diplay something  
like a dynamic result list.

For the dynamic part I created a special controller that gets  
initialized within the index method of my first controller. After the  
initialization I want to use the list action of my dynamic controller  
and diplay the result of the dynamic controller as the result of my  
current controller.

What I do is this:

def index  
params[:action] = “list”  
dynCtrl = DynamicController.new(_some\_fancy\_params_)  
dynCtrl.process(request, response)  
end

But instead of getting the expected result of my dynamic controller I  
get a “Template is missing …index.rhtml” error.

When I add the missing file index.rhtml I get the content of this file  
instead of the expected result list. I checked the return of my index  
and it looks like a perfectly filled ActionController::CgiResponse with  
the expected body comes back but it does not get displayed in the end.

What am I missing?

Thanks & Regards,

Christian

---

<div class="post-metadata">

**Author:** ![caefer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e36b37/32.png) [@caefer](https://www.ruby-forum.com/u/caefer)\
**Post date:** [April 16, 2007, 11:35am UTC](https://www.ruby-forum.com/t/controller-call-with-process-fails/92118/2 "2007-04-16T11:35:00Z")

</div>

Hi again,

figured it out myself. I only had to add:

```
render :text => dyn_response.body.to_s

```

And now I can see the expected result!

Chris

Christian S. wrote:

> Hi Folks,
> 
> I have a active\_scaffold based controller that should diplay something  
> like a dynamic result list.
> 
> For the dynamic part I created a special controller that gets  
> initialized within the index method of my first controller. After the  
> initialization I want to use the list action of my dynamic controller  
> and diplay the result of the dynamic controller as the result of my  
> current controller.
> 
> What I do is this:
> 
> def index  
> params[:action] = “list”  
> dynCtrl = DynamicController.new(_some\_fancy\_params_)  
> dynCtrl.process(request, response)  
> end
> 
> But instead of getting the expected result of my dynamic controller I  
> get a “Template is missing …index.rhtml” error.
> 
> When I add the missing file index.rhtml I get the content of this file  
> instead of the expected result list. I checked the return of my index  
> and it looks like a perfectly filled ActionController::CgiResponse with  
> the expected body comes back but it does not get displayed in the end.
> 
> What am I missing?
> 
> Thanks & Regards,
> 
> Christian
