Sha256: c6388be92500c9403a502ad0b85c8c7f8980245aa89d9be11a461e7566c67248
Contents?: true
Size: 533 Bytes
Versions: 41
Compression:
Stored size: 533 Bytes
Contents
# Reset follower_count for all the ActivityObjects that are not Actors # See: https://github.com/ging/social_stream/issues/274 class FixActivityObjectFollowerCount < ActiveRecord::Migration def up ActivityObject.record_timestamps = false ActivityObject.where("object_type != ?", "Actor").all.each do |ao| ao.update_attribute :follower_count, ao.received_actions.where(:follow => true).count end ActivityObject.record_timestamps = true ActivityObject.reset_column_information end def down end end
Version data entries
41 entries across 41 versions & 2 rubygems