module PaperclipPrivate module HasAttachedFile def register_new_attachment super PaperclipPrivate::AttachmentRegistry.register(@klass, @name, @options) if @options[:privacy] == :private end end end