# Undocumented syntax?

**URL:** <https://www.ruby-forum.com/t/undocumented-syntax/128655>\
**Category:** Rails\
**Created:** [February 9, 2008, 11:35pm UTC](https://www.ruby-forum.com/t/undocumented-syntax/128655 "2008-02-09T23:35:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rogwei](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e0b2c6/32.png) [@rogwei](https://www.ruby-forum.com/u/rogwei)\
**Post date:** [February 9, 2008, 11:35pm UTC](https://www.ruby-forum.com/t/undocumented-syntax/128655/1 "2008-02-09T23:35:16Z")

</div>

I came across this in [api.rubyonrails.org](http://api.rubyonrails.org) and am wondering if it is a  
typo or an undocumented feature. Can someone explain?

\<% form\_tag ‘/posts’ do -%\>

\<%= submit\_tag ‘Save’ %\>
  
\<% end -%\>

In particular, I refer to the closing Ruby delimiter ‘-%\>’ syntax that  
is repeated twice in this example.

Pardon me if this is obvious. I am still new to Ruby.

---

<div class="post-metadata">

**Author:** ![rogwei](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e0b2c6/32.png) [@rogwei](https://www.ruby-forum.com/u/rogwei)\
**Post date:** [February 9, 2008, 11:55pm UTC](https://www.ruby-forum.com/t/undocumented-syntax/128655/2 "2008-02-09T23:55:51Z")

</div>

On Feb 9, 2008, at 2:34 PM, rogwei wrote:

> I came across this in [api.rubyonrails.org](http://api.rubyonrails.org) and am wondering if it is a  
> typo or an undocumented feature. Can someone explain?
> 
> \<% form\_tag ‘/posts’ do -%\>
> 
> \<%= submit\_tag ‘Save’ %\>
>   
> \<% end -%\>
> 
> In particular, I refer to the closing Ruby delimiter ‘-%\>’ syntax that  
> is repeated twice in this example.

the - supresses white space output for that ERB line

–  
def gw  
acts\_as\_n00b  
writes\_at ‘www.railsdev.ws’  
end

---

<div class="post-metadata">

**Author:** ![rogwei](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e0b2c6/32.png) [@rogwei](https://www.ruby-forum.com/u/rogwei)\
**Post date:** [February 10, 2008, 1:03am UTC](https://www.ruby-forum.com/t/undocumented-syntax/128655/3 "2008-02-10T01:03:24Z")

</div>

For more ERB tags, check out:  
[http://stdlib.rubyonrails.org/libdoc/erb/rdoc/classes/ERB.html](http://stdlib.rubyonrails.org/libdoc/erb/rdoc/classes/ERB.html)

On Feb 9, 2008 2:54 PM, Greg W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > In particular, I refer to the closing Ruby delimiter ‘-%\>’ syntax that
> 
> >

–  
EPA Rating: 3000 Lines of Code / Gallon (of coffee)
