Reputation: 57
I'm using rails4 with paperclip. On one of my forms I would like to list only the records of a resource having a paperclips attachment. Is there any built in support for this in paperclip?
Upvotes: 0
Views: 111
Reputation: 196
Try using YourModel.where.not(attachment_file_name: nil)
YourModel.where.not(attachment_file_name: nil)
Upvotes: 2