RubyFlow The Ruby and Rails community linklog

validations for active_storage made easy

with https://github.com/igorkasyanchuk/active_storage_validations you can do:

validates :avatar, attached: true, content_type: ['image/png', 'image/jpg', 'image/jpeg'], size: { less_than: 500.kilobytes }

please try it! works with local files.

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