RJS Help

Hi all,

I am new to both Ruby and Ruby on Rails. I am trying to do the follow
inside a rjs template (building the Depot application using rails 2.0).

page.replace_html(“cart”, :partial => “cart”, :object => @cart)

if @current_item
page[:current_item].visual_effect(:highlight, :startcolor =>
#88ff88”, :endcolor => “#eeeeee”)
end

This code gets executed when a shopping cart item is removed from the
cart. It works fine as long as @current_item is set, but if
@current_item is not set then I don’t want the
page[:current_item].visual_effect statement to get excuted.

What am I doing wrong?

JZ