app/helpers/piggybak_helper.rb in piggybak-0.2.0 vs app/helpers/piggybak_helper.rb in piggybak-0.2.1

- old
+ new

@@ -3,10 +3,10 @@ render "piggybak/cart/form", :object => object end def cart_link cart = Piggybak::Cart.new(request.cookies["cart"]) nitems = cart.items.inject(0) { |nitems, item| nitems + item[:quantity] } - if nitems > 0 + if nitems > 0 && !["piggybak/orders", "piggybak/cart"].include?(params[:controller]) link_to "#{pluralize(nitems, 'item')}: #{number_to_currency(cart.total)}", piggybak.cart_url end end def orders_link(text) if current_user