On page 118, file store_controller.rb, the "redirect_to_index" is
added.
At mid page 120, that line is removed. When the browser is first sent to
the ":3000/store", the page displays properly. But when the Add to
Cart
button is clicked, the browser displays the text of a try-catch block
(see below). There is no error message - the browser clearly sees text
to be displayed. If I re-introduce the redirect line again, all
"seems"
to work well.
Q1: What causes the try-catch block text display? Its obviously
generated code; how would I find out what generated it?
Q2: How do I know when is the Ajax part is really working? What key
phrases should be displayed in the log file? (I''ve looked in the log
file, but I can''t tell.)
try {
Element.update("cart", "\074div
class=\"cart-title\"\076Your
Cart\074/div\076\n\074table\076\n\t\n\t\074tr\076
id=\"current_item\"\076\n\n\t\074td\0763×\074/td\076\n\t\074td\076Pragmatic
Project Automation\074/td\076\n (see the attachment for the rest)
Attachments:
http://www.ruby-forum.com/attachment/1397/Try-CatchSect9_2.txt
--
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
-~----------~----~----~----~------~----~------~--~---