ruby on rails - Paperclip model validation error message appears two times -


i have upload funtionality in rails, using rails paper clip. have defined model validation check image type.

validates_attachment :company_logo, content_type: { content_type: ["image/jpg", "image/jpeg", "image/png", "image/gif"] }

if upload other file extensions, showing 2 times message. want 1 message "company logo content type invalid"

company logo content type invalid company logo invalid 

please tell me solution. in advance


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

python - pip wont install .WHL files -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -