igorkasyanchuk/active_storage_validations

[Validator/Helper] Add validator & helper method to facilitate microsoft documents to content_type validator

Open

#316 opened on Dec 5, 2024

 (0 comments) (0 reactions) (0 assignees)Ruby (148 forks)github user discovery
enhancementgood first issue

Repository metrics

Stars
 (1,179 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

We could add a shorthand for msword, msexcel, msppt documents in our content_type validator. This shorthand could also be made available to the views to alleviate the effort of writing something like:

<%= form.file_field :document, accept: ".doc,.docx,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document" %>

Contributor guide