I have attached a screen shot of the error I am running into. I am on page 138 of the Agile Web Development with Rails book by Pragmatic Programmers. I am developing the depot store, and I ran into an error, with hidden_div_if. When I remove that block of code, things to work fine, besides the fact the cart does not display on the site, but everything else functions correctly, so it is something with that line 20 of code. <% hidden_div_if(@cart.items.empty?, :id => "cart") do %> Look at the screen shot, any help is much appreciated. Thanks, Brad Attachments: http://www.ruby-forum.com/attachment/155/Picture_1.png -- 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 -~----------~----~----~----~------~----~------~--~---
Thomas Wieczorek
2007-Aug-23 14:09 UTC
Re: need help trying to debug - included screenshot
2007/8/23, Brad Kenyon <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>:> > <% hidden_div_if(@cart.items.empty?, :id => "cart") do %> > > Look at the screen shot, any help is much appreciated. >It seems to me that you forgot to add "@cart = find_cart" in the action. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Thomas Wieczorek wrote:> 2007/8/23, Brad Kenyon <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>: >> >> <% hidden_div_if(@cart.items.empty?, :id => "cart") do %> >> >> Look at the screen shot, any help is much appreciated. >> > > It seems to me that you forgot to add "@cart = find_cart" in the action.thanks, i''ll try that tonight and reply whether or not that was the problem. thanks again! -- 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 -~----------~----~----~----~------~----~------~--~---