Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Readme doc not matching implementation #2687

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tylor
Copy link

@tylor tylor commented Apr 27, 2021

Using 6.1.0 and getting the error undefined method 'merge' for "image/jpeg":String (NoMethodError) in /lib/paperclip/validators.rb:48

This is working for me: validates_attachment_content_type :image, content_type: ["image/jpeg", "image/gif", "image/png"]

I think this would also work: validates_attachment :image, content_type: { content_type: ["image/jpeg", "image/gif", "image/png"] }

Validate attachment can't be used directly
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant