igorkasyanchuk/active_storage_validations

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

Ouverte

#316 ouverte le 5 déc. 2024

 (0 commentaire) (0 réaction) (0 personne assignée)Ruby (148 forks)github user discovery
enhancementgood first issue

Métriques du dépôt

Stars
 (1 179 étoiles)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

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" %>

Guide contributeur