<p>I've noticed that in some lines of rails views, this is used:</p>

<pre><code>&lt;% # Code... -%&gt; 
</code></pre>

<p>instead of:</p>

<pre><code>&lt;% # Code... %&gt;
</code></pre>

<p>What is the difference?</p>

```
```
<ul>
    <% @posts.each do |post| -%> 
      <li><%=post.title%></li>
    <% end -%>
    </ul>
```
```
There will be no new lines in between the
```
<ul>
```
and first
```
<li>
```
and the last closing
```
</li>
```
and
```
</ul>
```
. If the - was omitted, there would.