question about method "hidden_div_if" in AWDR 2

I followed the sample code in AWDR 2 like this:


def hidden_div_if(conditions, attributes = {})
  if conditions
    attributes["style"] = "display:none"
    attr = tag_options(attributes.stringify_keys)
    "<div #{attr}>"


<%= hidden_div_if(@cart.items.empty?, :id => "cart") %>
  <%= render(:partial => "cart", :object => @cart) %>

when the cart is empty, the "<div id=... class=...>" snippet is not
displayed there.

could anybody help me with this?

sorry for the mistake, I didn't read the sample code carefully.

there's no "if..else..end" structure in this method. :slight_smile: