<% end %>
</span>
<span class="add_attachment">
-<%= file_field_tag 'attachments_files',
+<%= file_field_tag 'attachments[dummy][file]',
:id => nil,
+ :class => 'file_selector',
:multiple => true,
:onchange => 'addInputFiles(this);',
:data => {
blockEventPropagation(e);
if ($.inArray('Files', e.dataTransfer.types) > -1) {
-
- uploadAndAttachFiles(e.dataTransfer.files, $('input:file[name=attachments_files]'));
+ uploadAndAttachFiles(e.dataTransfer.files, $('input:file.file_selector'));
}
}
get :show, :id => 1
assert_select 'form#issue-form[method=post][enctype=multipart/form-data]' do
- assert_select 'input[type=file][name=?]', 'attachments_files'
+ assert_select 'input[type=file][name=?]', 'attachments[dummy][file]'
end
end
get :new, :project_id => 1, :tracker_id => 1
assert_select 'form[id=issue-form][method=post][enctype=multipart/form-data]' do
- assert_select 'input[name=?][type=file]', 'attachments_files'
+ assert_select 'input[name=?][type=file]', 'attachments[dummy][file]'
end
end