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 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---