Controller call with "process" fails

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

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