Hello, I''m getting an unusual error and was hoping for some insight. I''m following the tutorial in Agile Web Development with Rails, and I''ve gotten stuck on Chapter 9: Checkout. When it calls for the render_component( ) method in the checkout.rhtml file, it invokes the display_cart( ) action, effectively rendering a page inside a page. I''ve added the appropriate params to the to the render_component method, and instead of seeing what I should see, I get this error- ActionView::ActionViewError in <controller not set>#display_cart No rhtml, rxml, or delegate template found for layoutfalse app/controllers/store_controller.rb:22:in `display_cart'' (erb):2:in `evaluate_locals'' script/server:48 Any thoughts or advice would be greatly appreciated. Thanks.
What does the layout code for that controller look like? Can you paste that, and any functions that it might be calling? On 7/21/05, Stan <mistersatan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hello, I''m getting an unusual error and was hoping for some insight. > > I''m following the tutorial in Agile Web Development with Rails, and > I''ve gotten stuck on Chapter 9: Checkout. When it calls for the > render_component( ) method in the checkout.rhtml file, it invokes the > display_cart( ) action, effectively rendering a page inside a page. > I''ve added the appropriate params to the to the render_component > method, and instead of seeing what I should see, I get this error- > > ActionView::ActionViewError in <controller not set>#display_cart > > No rhtml, rxml, or delegate template found for layoutfalse > > app/controllers/store_controller.rb:22:in `display_cart'' > (erb):2:in `evaluate_locals'' > script/server:48 > > Any thoughts or advice would be greatly appreciated. Thanks. > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
What version of Rails are you using? The render function got changed quite recently and the Rails book uses the latest version. On 7/21/05, Stan <mistersatan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Sure. This is what the layout code looks like for the display_cart method- > > def display_cart > @items = cart.items > if @items.empty? > redirect_to_index("Your cart is currently empty") > end > if params[:context] == :checkout > render(:layout => false) > end > end > > > On 7/21/05, Joe Van Dyk <joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > What does the layout code for that controller look like? Can you > > paste that, and any functions that it might be calling? > > > > On 7/21/05, Stan <mistersatan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hello, I''m getting an unusual error and was hoping for some insight. > > > > > > I''m following the tutorial in Agile Web Development with Rails, and > > > I''ve gotten stuck on Chapter 9: Checkout. When it calls for the > > > render_component( ) method in the checkout.rhtml file, it invokes the > > > display_cart( ) action, effectively rendering a page inside a page. > > > I''ve added the appropriate params to the to the render_component > > > method, and instead of seeing what I should see, I get this error- > > > > > > ActionView::ActionViewError in <controller not set>#display_cart > > > > > > No rhtml, rxml, or delegate template found for layoutfalse > > > > > > app/controllers/store_controller.rb:22:in `display_cart'' > > > (erb):2:in `evaluate_locals'' > > > script/server:48 > > > > > > Any thoughts or advice would be greatly appreciated. Thanks. > > > _______________________________________________ > > > Rails mailing list > > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > >
I''m running the latest version of Rails. On 7/21/05, Joe Van Dyk <joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> What version of Rails are you using? The render function got changed > quite recently and the Rails book uses the latest version. > > On 7/21/05, Stan <mistersatan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Sure. This is what the layout code looks like for the display_cart method- > > > > def display_cart > > @items = cart.items > > if @items.empty? > > redirect_to_index("Your cart is currently empty") > > end > > if params[:context] == :checkout > > render(:layout => false) > > end > > end > > > > > > On 7/21/05, Joe Van Dyk <joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > What does the layout code for that controller look like? Can you > > > paste that, and any functions that it might be calling? > > > > > > On 7/21/05, Stan <mistersatan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Hello, I''m getting an unusual error and was hoping for some insight. > > > > > > > > I''m following the tutorial in Agile Web Development with Rails, and > > > > I''ve gotten stuck on Chapter 9: Checkout. When it calls for the > > > > render_component( ) method in the checkout.rhtml file, it invokes the > > > > display_cart( ) action, effectively rendering a page inside a page. > > > > I''ve added the appropriate params to the to the render_component > > > > method, and instead of seeing what I should see, I get this error- > > > > > > > > ActionView::ActionViewError in <controller not set>#display_cart > > > > > > > > No rhtml, rxml, or delegate template found for layoutfalse > > > > > > > > app/controllers/store_controller.rb:22:in `display_cart'' > > > > (erb):2:in `evaluate_locals'' > > > > script/server:48 > > > > > > > > Any thoughts or advice would be greatly appreciated. Thanks. > > > > _______________________________________________ > > > > Rails mailing list > > > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
On Jul 21, 2005, at 20:32, Stan wrote:> I''m running the latest version of Rails.I don''t believe you are... That error is because Rails is interpreting render(:layout => false) using the old-style render, not the new. You might want to check that you''re running 0.13.1 Rails. Cheers Dave _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails