There is Something wrong with the div

<% if @cart.items.empty? %> style="display: none" <% end %> <%= hidden_div_if(@cart.items.empty?, :id => "cart") %>

i dont know how to fix it, iv looked all over the book ruby on rails and
cant ever find whats wrong with it…

For starters, it seems the style info should be inside the <div opening
tag,
like this:

style="display: none"<% end %>>
<% if @cart.items.empty? %> style="display: none" <% end %> <%= hidden_div_if(@cart.items.empty?, :id => "cart") %>

<%
style = “”
style = “display:none” if @cart.items.empty?
%>

> ....

Is what I’m assuming you want. There’s shorter ways of writing the
setting
of the style variable, but this is the easiest to understand (IMHO).