Showing posts with label "TypeError: $("current_item") has no properties". Show all posts
Showing posts with label "TypeError: $("current_item") has no properties". Show all posts

Monday, February 18, 2008

AWDR depot app for Rails 2.0 (RubyPlus.org) - Part 2

Here goes part 2.

I've finished the screencasts for chapter 8, 9, and 10.

Here are the problems I came across while doing so:

At the beginning of chapter 8, the top of the screen is cut off when creating sessions in the database, the is the whole line:

rake db:sessions:create


And then towards the beginning of chapter 10, a line is cut off in 005_create_line_items.rb

t.decimal :total_price, :null => false, :precision => 8, :scale => 2


I had some trouble with the ajax highlight effect in add_to_cart.js.rjs

page[:current_item].visual_effect :highlight,
:startcolor => "#88ff88",
:endcolor => "#114411"


and was not able to figure it out. When I clicked Add to Cart, I would get the error "TypeError: $("current_item") has no properties" and then another popup window with a lot of code in it. I looked around the internet for a while trying to get it fixed, but nothing I tried worked. If anyone figures this out, let me know. I ended up commenting out that line in add_to_cart.js.rjs.

Everything else works great. I really like Bala's screencasts, they are a great resource for learning Rails 2.0. After finishing them, I believe I know enough to make something that is not too complicated. For my next post, I believe I am going to start working on a forum in Rails, and AJAX it up(I could use a lot more experience with AJAX).

See you all next time!