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| %>
<p><label>Your Name:<br /><%= f.text_field :name, :size => 25
%></label></p>
<p><label>Your email:<br /> <%= f.text_field :email, :size => 25
%></label></p>
<p><label>Message:<br /><%= f.text_area :body, :rows => 10, :cols => 30
%></label></p>
<p><label><%= submit_tag 'Submit'   %> </label></p>
<% 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| -%>
  <p>Title:<br /><%= f.text_field :title, :size => 60 %></p>
  <p>Body:<br /><%= f.text_area :body, :rows => 20, :cols => 60 %></p>
  <%= 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
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to