Sha256: 3d485e2bffaf4949172e541a2b8f2e33a0ba9ec935cec238cf179474aea6bc79

Contents?: true

Size: 1.44 KB

Versions: 5

Compression:

Stored size: 1.44 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 %>

  <div class="field">
    <%= f.label :title %><br />
    <%= f.text_field :title %>
  </div>
  <div class="field">
    <%= f.label :text %><br />
    <%= f.text_area :text %>
  </div>

  <h3>uploads</h3>
  <div class="field" style="overflow: hidden;">
    <label>images and videos</label>
    <%- if @post.new_record? -%>
      create first
    <%- else -%>
      <%= attachment_uploader(@post, :images, :video) %>
      <%= attachment_uploader(@post, :images, :image) %>
      <%= attachment_loader(@post, :images) %>
    <%- end -%>
  </div>

  <div class="field">
    <label>files</label>
    <%- if @post.new_record? -%>
      create first
    <%- else -%>
      <%= attachment_uploader(@post, :files, :file) %>
      <%= attachment_loader(@post, :files) %>
    <%- end -%>
  </div>

  <div class="field" style="overflow: hidden;">
  <label>just videos</label>
    <%- if @post.new_record? -%>
      create first
    <%- else -%>
      <%= attachment_uploader(@post, :just_videos, :video) %>
      <%= attachment_loader(@post, :just_videos) %>
    <%- end -%>
  </div>

  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
media_magick-0.4.1 spec/dummy/app/views/posts/_form.html.erb
media_magick-0.4.0 spec/dummy/app/views/posts/_form.html.erb
media_magick-0.3.3 spec/dummy/app/views/posts/_form.html.erb
media_magick-0.3.2 spec/dummy/app/views/posts/_form.html.erb
media_magick-0.3.0 spec/dummy/app/views/posts/_form.html.erb