I want to display product count in a link\_to, the link\_to is a part of partial displayed in application.erb.html, the problem is, I have a method in my application controller named products\_on\_cart which return products count, when I try this code:

```
<%= link_to "<%= products_on_cart%>", :controller=>"carts", :action=>"index"%>

```

rails give me an error: 

> 
> "syntax error, unexpected '>'  
> 
>  ...er=>"carts", :action=>"index"%>"
> 
> 
> 

I don't really understand why, can somebody help me?