ruby on rails 3.2 - RoR - Slim - If Tag - Adds semicolon to end of line -
i new ruby on rails , find fascinating langue. there aspects not understand , not having time read book. appreciated.
some basic information project:
- rails 3.2
- ruby 2.0
- on slim
- spree e-commerce framework
i trying write if-block display block of html if current page not shopping bag page.
here code:
- if !current_page(cart_path)? href="#{cart_path}" div#shopping-cart-container class="btn" i.icon-shopping-cart - link = link_to_cart "cart" = strip_tags link when run page, following error:
/var/www/odesk/cn/redrose_project/src/app/views/shared/_header.html.slim:15: syntax error, unexpected ';' ; if current_page(cart_path)?; ^ i think slim error. current_page(cart_path)? comes the documentation of framework caz not still sophisticated write own logic.
what wrong? in advance.
Comments
Post a Comment