30 lines
683 B
Plaintext
30 lines
683 B
Plaintext
|
<%= form_for(@post) do |f| %>
|
||
|
<% if @post.errors.any? %>
|
||
|
<div id="error_explanation">
|
||
|
<h2><%= pluralize(@post.errors.count, "error") %> prohibited this post from being saved:</h2>
|
||
|
|
||
|
<ul>
|
||
|
<% @post.errors.full_messages.each do |msg| %>
|
||
|
<li><%= msg %></li>
|
||
|
<% end %>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<% end %>
|
||
|
|
||
|
<div class="field">
|
||
|
<%= f.label :user_id %><br />
|
||
|
<%= f.text_field :user_id %>
|
||
|
</div>
|
||
|
<div class="field">
|
||
|
<%= f.label :title %><br />
|
||
|
<%= f.text_field :title %>
|
||
|
</div>
|
||
|
<div class="field">
|
||
|
<%= f.label :body %><br />
|
||
|
<%= f.text_area :body %>
|
||
|
</div>
|
||
|
<div class="actions">
|
||
|
<%= f.submit %>
|
||
|
</div>
|
||
|
<% end %>
|