Skip to content
Snippets Groups Projects
Commit c31cce68 authored by Mateus Rambo Strey's avatar Mateus Rambo Strey
Browse files

change allowed content_type in user avatar

parent cdf7473b
No related branches found
No related tags found
No related merge requests found
......@@ -74,7 +74,7 @@ class User < ApplicationRecord
after_create :default_role
has_attached_file :avatar, styles: { medium: '300x300>', thumb: '60x60>' }, default_url: ''
validates_attachment_content_type :avatar, content_type: %r{ \Aimage\/.*\Z }
validates_attachment_content_type :avatar, content_type: ['image/jpg', 'image/jpeg', 'image/png', 'image/gif']
validates :terms_of_service, acceptance: true
searchkick language: 'brazilian', match: :word_start, searchable: [:name], callbacks: :async
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment