Ruby on Rails Sunday, May 5, 2013

new.html.erb copied from the tutorial as is:
<% form_for :post, url: posts_path do |f| %>
<p>
<%= f.label :title %><br>
<%= f.text_field :title %>
</p>

<p>
<%= f.label :text %><br>
<%= f.text_area :text %>
</p>

<p>
<%= f.submit %>
</p>
<% end %>

I can put <%= "hi" %> before or after form_for, and see it. But not
inside form_for - then I won't see it. Probably because :post is
nonexistent it doesn't get rendered at all.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment