Reputation: 12044
I'm using ruby on rails and haml, but I'm looking for a similar behavior to this:
input type="file" accept=".gif,.jpg,.jpeg,.png,.doc,.docx">
but, with my code:
= f.file_field :document_file, class: 'margin-none'
I tried add it like a new parameter, but doesn't works. Does Someone has an idea?
Upvotes: 0
Views: 144
Reputation: 961
=f.file_field(: document_file, accept: 'image/png,image/gif,image/jpeg,image/jpg,image/doc,image/docx',class: 'margin-none')
Upvotes: 1