Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix attached file name hidden on edit page

  • Loading branch information...
commit 1e94fe18f3ffe4c9aabb4ddafc65ec99ef9c11dd 1 parent 30bfd26
@kyungbae kyungbae authored
View
2  app/views/partials/_upload_fields.html.haml
@@ -3,7 +3,7 @@
= f.input :content_cache, as: :hidden
.dummyfile
%a.fileselectbutton.btn Choose...
- %input.filename{type: 'text', name: 'filename'}
+ %input.filename{type: 'text', name: 'filename', value: f.object["content"]}
.links-remove
= link_to_remove_association '', f, :class => 'icon-minus-circle'
#alert-message
View
2  spec/features/edit_contribution_spec.rb
@@ -51,7 +51,7 @@
expect(page).to have_content('Can\'t be blank')
end
- it 'allsows a user add a file' do
+ it 'allows a user add a file' do
click_on 'Add Upload'
page.execute_script("$('.file.optional.upload').toggle();")
find(".input.file.optional.transcription_uploads_content").find('input').set("#{Rails.root}/spec/support/Montmarte.jpg")
Please sign in to comment.
Something went wrong with that request. Please try again.