I have a counter_culture counter that depends on whether a Paperclip attachment is defined or not:
class Post < ::ActiveRecord::Base
belongs_to :user
counter_culture :user, column_name: Proc.new { |p| p.media? ? 'posts_with_photo_count' : nil }
end
The issue is that the counter is not updated when the post is either updated nor destroyed.
I guess it should have something to do with Paperclip's own callback system.