<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
  <channel>
    <title>Recent Posts in 'I can't wait - 2 problems found are there solutions?' | Pragmatic Forums</title>
    <link>http://forums.pragprog.com/forums/66/topics/423</link>
    <language>en-us</language>
    <ttl>60</ttl>
    <description></description>
    <item>
      <title>I can't wait - 2 problems found are there solutions? posted by James West @ Tue, 13 May 2008 07:50:04 -0000</title>
      <description>&lt;p&gt;Many thanks.&lt;/p&gt;


	&lt;p&gt;Just found the solution to the problem with the rjs error&lt;/p&gt;


	&lt;p&gt;I had an error in my code in cart.rb&lt;/p&gt;


&lt;code&gt;current_item = CartItem.new(product)&lt;/code&gt;&lt;br /&gt;&lt;code&gt;@items &amp;lt;&amp;lt; CartItem(product)&lt;/code&gt;

	&lt;p&gt;Should have been&lt;/p&gt;


&lt;code&gt;current_item = CartItem.new(product)&lt;/code&gt;&lt;br /&gt;&lt;code&gt;@items &amp;lt;&amp;lt; current_item&lt;/code&gt;

	&lt;p&gt;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?&lt;/p&gt;


	&lt;p&gt;Very strange.&lt;/p&gt;


	&lt;p&gt;I will make the changes you have pointed out to me and many thanks for your response. It really is appreciated.&lt;/p&gt;


	&lt;p&gt;No need to apologise for the mistakes &amp;#8211; I just couldn&amp;#8217;t wait for the final release.&lt;/p&gt;


	&lt;p&gt;I have a &lt;span class="caps"&gt;MAJOR&lt;/span&gt; eBay app that I am wanting to develop and am wanting to do this in Ruby.&lt;/p&gt;


	&lt;p&gt;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.&lt;/p&gt;


	&lt;p&gt;So thank you so much once again&lt;/p&gt;


	&lt;p&gt;James&lt;/p&gt;</description>
      <pubDate>Tue, 13 May 2008 07:50:04 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:66:423:2784</guid>
      <author>James West</author>
      <link>http://forums.pragprog.com/forums/66/topics/423</link>
    </item>
    <item>
      <title>I can't wait - 2 problems found are there solutions? posted by Sam Ruby @ Mon, 12 May 2008 20:39:23 -0000</title>
      <description>&lt;p&gt;I&amp;#8217;m having difficulty reproducing the &lt;span class="caps"&gt;RJS&lt;/span&gt; error, but there was an error in the :highlight visual effect code; it should read &amp;#8220;startcolor&amp;#8221; and &amp;#8220;endcolor&amp;#8221; (note: no underscores).&lt;/p&gt;


	&lt;p&gt;The store controller is missing a line after the Order.new:&lt;/p&gt;


&lt;pre&gt;
@order.add_line_items_from_cart(@cart)
&lt;/pre&gt;

	&lt;p&gt;Finally, line_item.rb is missing a line after the assignment to li.total_price:&lt;/p&gt;


&lt;pre&gt;
li
&lt;/pre&gt;

	&lt;p&gt;Sorry about this, and hopefully we will have a beta update out in a few days with these and other errata corrected.&lt;/p&gt;</description>
      <pubDate>Mon, 12 May 2008 20:39:23 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:66:423:2778</guid>
      <author>Sam Ruby</author>
      <link>http://forums.pragprog.com/forums/66/topics/423</link>
    </item>
    <item>
      <title>I can't wait - 2 problems found are there solutions? posted by James West @ Mon, 12 May 2008 13:14:44 -0000</title>
      <description>&lt;p&gt;Hi I have thoroughly enjoyed this book so far &amp;#8211; Thank you very much!&lt;/p&gt;


	&lt;p&gt;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.&lt;/p&gt;


	&lt;p&gt;Both errors are mentioned in the errata however no solution has yet come to light.&lt;/p&gt;


	&lt;p&gt;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.&lt;/p&gt;


	&lt;p&gt;Problem 1.&lt;br /&gt;From the errata page reported by Dave Isaacs.
#31959: After I add the :highlight visual effect, if I click on the Add to Cart button for a book that is not already in the cart, I get the following popup: &amp;#8220;RJS error: TypeError: $(&amp;#8220;current_item&amp;#8221;) has not properties.&amp;#8221;&lt;/p&gt;


	&lt;p&gt;This is followed by a large popup outlining an Element.update() statement followed by a $(&amp;#8220;current_item&amp;#8221;).visualEffect(...) call.&amp;#8212;Dave Isaacs&lt;/p&gt;


	&lt;p&gt;Problem 2&lt;br /&gt;From the errata pages reported by me :-).
#31981: There does not seem to be any method to save a line item.&lt;/p&gt;


	&lt;p&gt;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.&lt;/p&gt;


	&lt;p&gt;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.&lt;/p&gt;


	&lt;p&gt;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.&lt;/p&gt;


	&lt;p&gt;So could this please be covered in a future revision.&lt;/p&gt;


	&lt;p&gt;Thanks&amp;#8212;James West&lt;/p&gt;


	&lt;p&gt;Any help in pointing me in the right direction would be greatly appreciated&lt;/p&gt;


	&lt;p&gt;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.&lt;/p&gt;</description>
      <pubDate>Mon, 12 May 2008 13:14:44 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:66:423:2775</guid>
      <author>James West</author>
      <link>http://forums.pragprog.com/forums/66/topics/423</link>
    </item>
  </channel>
</rss>
