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 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Christian Schlaefcke
2007-Apr-16 09:35 UTC
Re: Controller call with "process" fails [solved]
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 Schlaefcke 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-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---