Sha256: 6afb8321f59f34a4ec9f89d02da6e21d6bc747baa1d389bc063d6d329739b53a

Contents?: true

Size: 586 Bytes

Versions: 4

Compression:

Stored size: 586 Bytes

Contents

<%= 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 :title %><br />
    <%= f.text_field :title %>
  </div>
  <div class="field">
    <%= f.label :body %><br />
    <%= f.text_field :body %>
  </div>
  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ampere-1.2.3 example/app/views/posts/_form.html.erb
ampere-1.2.2 example/app/views/posts/_form.html.erb
ampere-1.2.1 example/app/views/posts/_form.html.erb
ampere-1.2.0 example/app/views/posts/_form.html.erb