nelstrom/VimshopLocations — comment on commit ab347feaf4456c9554bccb480befebf30967b3ea
File: lib/tasks/subscribers.rake line 13
By DylanFM:

There is Location.reset_counters (https://github.com/rails/rails/blob/d9ebc76d70a122544452189f0cb93d3854f2043f/activerecord/lib/active_record/counter_cache.rb#L17), but it's probably not what you want here. Maybe it'd be better to try and avoid needing to do this clearing in the 1st place. Are there duplicates or something? We might need a find_or_create_ (http://edgeguides.rubyonrails.org/active_record_querying.html#find-or-build-a-new-object) but IIRC we had some weird issues with this.