Sha256: 90e564e21ed136165b5e10449e0424cdaf75c5277ec27dba87142e63e26a6c51

Contents?: true

Size: 1.04 KB

Versions: 4

Compression:

Stored size: 1.04 KB

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 %>
<ul>
  <% @categories.each do |c| %>
          <li><%= check_box_tag "post[category_ids][]", c.id, @post.categories.include?(c) %>
<%= c.name %></li>
        <%- end -%>
      </ul>
  <div class="field">
    <%= f.label :published %><br />
    <%= f.check_box :published %>
  </div>
  <div class="field">
    <%= f.label :title %><br />
    <%= f.text_field :title %>
  </div>
  <div class="field">
    <%= f.label :date %><br />
    <%= f.datetime_select :date %>
  </div>
    <div class="field">
    <%= f.label :excerpt %><br />
    <%= f.text_area :excerpt %>
  </div>
  <div class="field">
    <%= f.label :body %><br />
    <%= f.text_area :body %>
  </div>
  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
blogmodule-1.0.2 app/views/posts/_form.html.erb
blogmodule-1.0.1 app/views/posts/_form.html.erb
blogmodule-1.0.0 app/views/posts/_form.html.erb
blogmodule-0.0.1 app/views/posts/_form.html.erb