So, the hacker way to resolve this (which can easily turn into a paper clip fork) is to change the above code to just ready:
Person.all.collect(&:id)
or
Person.connection.select_values(Person.send( :construct_finder_sql, :select => 'id', :conditions => { :deleted => false } ))
The first parameter simply forces Paperclip to execute the request through Rails, which essentially goes through BrowserCMS, thereby using its limitations (i.e.: without seeing any deleted entries). The second option makes almost the same request, but does not contain records deleted by BCMS.
I believe the first option is best, since it allows BCMS to control the request, so if something changes, your monkey patch will not break.
source share