Design Element
Comment on "Error in Basic Rails Migration"
by Daniel Lyons — Dec 24
Don't blame yourself too much. I helped a friend debug his Rails program the other day. He was taking one of the tutorials in the Rails book, and the first item of a particular type he added to the shopping cart was producing a bizarre JavaScript error. It turned out the problem section of code was just this:

@items <<, 1)
@current_item =, 1)

Upon changing that to this, it just worked:

@current_item =, 1)
@items << @current_item

It was one of the more bizarre and hard to track down errors I've ever seen.
Back to "Error in Basic Rails Migration"
Design Element

Copyright © Scott Stevenson 2004-2015