# Rhtml output

**URL:** <https://www.ruby-forum.com/t/rhtml-output/110481>\
**Category:** Rails\
**Created:** [July 26, 2007, 6:27pm UTC](https://www.ruby-forum.com/t/rhtml-output/110481 "2007-07-26T18:27:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ricklach](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/47e85d/32.png) [@ricklach](https://www.ruby-forum.com/u/ricklach)\
**Post date:** [July 26, 2007, 6:27pm UTC](https://www.ruby-forum.com/t/rhtml-output/110481/1 "2007-07-26T18:27:26Z")

</div>

Just a simple question. I know what this does" \<%= %\> for output but  
what is the purpose of the negative sign in this \<%= -%\> in a rhtml  
template?

---

<div class="post-metadata">

**Author:** ![ricklach](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/47e85d/32.png) [@ricklach](https://www.ruby-forum.com/u/ricklach)\
**Post date:** [July 26, 2007, 6:32pm UTC](https://www.ruby-forum.com/t/rhtml-output/110481/2 "2007-07-26T18:32:00Z")

</div>

On Jul 26, 12:27 pm, Rick L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Just a simple question. I know what this does" \<%= %\> for output but  
> what is the purpose of the negative sign in this \<%= -%\> in a rhtml  
> template?

Doesn’t “-” suppress newlines?

---

<div class="post-metadata">

**Author:** ![ricklach](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/47e85d/32.png) [@ricklach](https://www.ruby-forum.com/u/ricklach)\
**Post date:** [July 26, 2007, 6:36pm UTC](https://www.ruby-forum.com/t/rhtml-output/110481/3 "2007-07-26T18:36:01Z")

</div>

> On Jul 26, 12:27 pm, Rick L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> wrote:
> 
> > Just a simple question. I know what this does" \<%= %\> for output but  
> > what is the purpose of the negative sign in this \<%= -%\> in a rhtml  
> > template?
> 
> Doesn’t “-” suppress newlines?

Yes.

---

<div class="post-metadata">

**Author:** ![ricklach](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/47e85d/32.png) [@ricklach](https://www.ruby-forum.com/u/ricklach)\
**Post date:** [July 26, 2007, 6:37pm UTC](https://www.ruby-forum.com/t/rhtml-output/110481/4 "2007-07-26T18:37:01Z")

</div>

On Thu, 26 Jul 2007, Eno wrote:

> On Jul 26, 12:27 pm, Rick L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> wrote:
> 
> > Just a simple question. I know what this does" \<%= %\> for output but  
> > what is the purpose of the negative sign in this \<%= -%\> in a rhtml  
> > template?
> 
> Doesn’t “-” suppress newlines?

Yes, within Rails. IIRC erb/eruby doesn’t make use of this outside  
Rails.

```
    HTH
    Hugh

```
