Sha256: 5d4007d1c257416a12c3f268d12567b50b8ae470a00d9360e135b6d89ed8e36b
Contents?: true
Size: 383 Bytes
Versions: 1
Compression:
Stored size: 383 Bytes
Contents
# A single word in the search index. class PoseWord < ActiveRecord::Base has_many :pose_assignments attr_accessible :text 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pose-1.1.3 | lib/pose/models/pose_word.rb |