active_storage + validations
https://github.com/igorkasyanchuk/active_storage_validations this gem is to add validations in Rails models without custom validations.
Sample:
has_one_attached :attachment
validates :attachment, attached: true, content_type: { in: ‘application/pdf’, message: ‘is not a PDF’ }
Comments
Very cool 😀
Very useful gem.
but if you can change actions_storage to active_storage in the title
fixed :) thank you
Post a comment