Sha256: 5b7f2ee1a98278fbcaf3ec4972ff34483ce6ec56c819ae9f48a3052aa2cfee40
Contents?: true
Size: 365 Bytes
Versions: 9
Compression:
Stored size: 365 Bytes
Contents
# A single word in the search index. class PoseWord < ActiveRecord::Base has_many :pose_assignments def self.remove_unused_words progress_bar = nil PoseWord.find_each(:include => [:pose_assignments], :batch_size => 5000) do |pose_word| pose_word.delete if pose_word.pose_assignments.size == 0 progress_bar.inc if progress_bar end end end
Version data entries
9 entries across 9 versions & 1 rubygems