Sha256: c73b7ab90d3099a18014b7baa96a9acae4f6fd46217ea2feb29d0ae3adb780d9

Contents?: true

Size: 799 Bytes

Versions: 11

Compression:

Stored size: 799 Bytes

Contents

<% if defined?(container) && container.present? %>
  <% new_file_attachment = FileAttachment.new(:attachable => container) %>
<% else %>
  <% new_file_attachment = FileAttachment.new %>
<% end %>
<% semantic_form_for new_file_attachment, :html => { :multipart => true } do |f| %>

  <%= 
  # todo replace f.error_messages
  #f.error_messages
  %>

  <% f.inputs do %>
    <% if new_file_attachment.attachable.present? %>
    <%= f.input :attachable_id, :as => :hidden %>
    <%= f.input :attachable_type, :as => :hidden %>
    <% end %>
    <%= f.input :name, :label => 'Name' %>
    <%= f.input :description, :label => 'Description' %>
    <%= f.input :uploaded_file, :as => :file, :label => 'Filepath' %>
  <% end %>

  <%= f.buttons %>
<% end if has_authorization?(:create, FileAttachment.new) %>

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
file_share-0.1.16 app/views/file_attachments/_upload_form.html.erb
file_share-0.1.15 app/views/file_attachments/_upload_form.html.erb
file_share-0.1.13 app/views/file_attachments/_upload_form.html.erb
file_share-0.1.12 app/views/file_attachments/_upload_form.html.erb
file_share-0.1.11 app/views/file_attachments/_upload_form.html.erb
file_share-0.1.9 app/views/file_attachments/_upload_form.html.erb
file_share-0.1.8 app/views/file_attachments/_upload_form.html.erb
file_share-0.1.7 app/views/file_attachments/_upload_form.html.erb
file_share-0.1.6 app/views/file_attachments/_upload_form.html.erb
file_share-0.1.5 app/views/file_attachments/_upload_form.html.erb
file_share-0.1.4 app/views/file_attachments/_upload_form.html.erb