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

How to check data type in C++? -

javascript - Is getTimezoneOffset() stable during daylight saving transition? -

sql server - SQL Query returns one result, does not return 0 or NULL result -