I can't wait - 2 problems found are there solutions?
James West
37 posts
|
Hi I have thoroughly enjoyed this book so far – Thank you very much! I am on my first run through the book and coding as I go but have come across a couple of technical errors that caused me to visit the errata pages and thence found my way here. Both errors are mentioned in the errata however no solution has yet come to light. I am so enthusuastic and really want to get this sorted out so was wondering if there would be a solution to these issues before the next release of the book. Problem 1. This is followed by a large popup outlining an Element.update() statement followed by a $(“current_item”).visualEffect(...) call.—Dave Isaacs Problem 2 I assume that the item should be saved if the @order.save call is successful but being a total newbie I am not yet clear on the best way of implementing this. I think this is an area of relational database handling that really needs explanation especially after such an excellent description of how foreign key relationships behave on the previous pages. This totally superb book gave me the confidence to try to find a solution but I have yet to find one that does not completely lock the database and cause internal server error 500 pages to be displayed after submitting the order. So could this please be covered in a future revision. Thanks—James West Any help in pointing me in the right direction would be greatly appreciated I fully intend to run through this book coding as I go a couple more times as there is so much to take in and I am sure that I will be able to work these issues out when I have taken it all in but really wanted a solution before I get too much further into the book as I suspect that it will be important. |
Sam Ruby
111 posts
|
I’m having difficulty reproducing the RJS error, but there was an error in the :highlight visual effect code; it should read “startcolor” and “endcolor” (note: no underscores). The store controller is missing a line after the Order.new: @order.add_line_items_from_cart(@cart) Finally, line_item.rb is missing a line after the assignment to li.total_price: li Sorry about this, and hopefully we will have a beta update out in a few days with these and other errata corrected. |
James West
37 posts
|
Many thanks. Just found the solution to the problem with the rjs error I had an error in my code in cart.rb current_item = CartItem.new(product)@items << CartItem(product)
Should have been current_item = CartItem.new(product)@items << current_item
I have no idea why this happened but it seems I am not the only one to have this problem so maybe worth adding a note about this in the next book revision? Very strange. I will make the changes you have pointed out to me and many thanks for your response. It really is appreciated. No need to apologise for the mistakes – I just couldn’t wait for the final release. I have a MAJOR eBay app that I am wanting to develop and am wanting to do this in Ruby. Your book has been tremendous in helping me to understand the way Ruby fits together although I still have quite a way to go I am very impressed with the way the book has been able to help me understand how to make the best use of the language in such a short period of time (4 days since I bought the pdf. So thank you so much once again James |
3 posts, 2 voices
