# Form\_for yags questions

**URL:** <https://www.ruby-forum.com/t/form-for-yags-questions/150663>\
**Category:** Rails\
**Created:** [October 11, 2008, 12:59am UTC](https://www.ruby-forum.com/t/form-for-yags-questions/150663 "2008-10-11T00:59:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jsn1](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/7ea924/32.png) [@jsn1](https://www.ruby-forum.com/u/jsn1)\
**Post date:** [October 11, 2008, 12:59am UTC](https://www.ruby-forum.com/t/form-for-yags-questions/150663/1 "2008-10-11T00:59:50Z")

</div>

Hi have a question about several tags, I do not understand if they are  
RoR tags os something else

this is my form, I wrote it following the book “Simply Rails 2” in  
chapter 6:

\<% form\_for @contacto do |f| %\>

Your N.:  
\<%= f.text\_field :name, :size =\> 25 %\>

Your email:  
 \<%= f.text\_field :email, :size =\> 25 %\>

Message:  
\<%= f.text\_area :body, :rows =\> 10, :cols =\> 30 %\>

\<%= submit\_tag 'Submit' %\>

\<% end %\>

This is another form I found on “open source social network - from the  
apress book”

\<%= error\_messages\_for :page %\>

\<% form\_for :page, :url =\> pages\_url, :html =\> { :method =\> :post } do  
|f| -%\>

Title:  
\<%= f.text\_field :title, :size =\> 60 %\>

Body:  
\<%= f.text\_area :body, :rows =\> 20, :cols =\> 60 %\>

 \<%= submit\_tag 'Save' %\> or \<%= link\_to 'cancel', pages\_url %\> \<% end -%\>

questions:

- is “error\_messages\_for” a RoR reserved statement?
- in this expression “:url =\> pages\_url”, where does pages\_url come  
from?
- in this expression ":html =\> { :method =\> :post } " why o I need  
a post?
- what is the difference between using “@contacto” and “:contacto”,  
in form\_for. \<% form\_for @contacto … or \<% form\_for :contacto
