RubyFlow The Ruby and Rails community linklog

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

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in