Sha256: c3163e6a06c95da2b4f2e3ed13321d1ff9969f5933a99ae1167a880a876f7cf1

Contents?: true

Size: 723 Bytes

Versions: 1

Compression:

Stored size: 723 Bytes

Contents

<% if defined?(container) && container %>
  <% 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 %>
    <%= f.input :attachable_id, :as => :hidden %>
    <%= f.input :attachable_type, :as => :hidden %>
    <%= 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

1 entries across 1 versions & 1 rubygems

Version Path
file_share-0.1.3 app/views/file_attachments/_upload_form.html.erb