Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. Tutor.all.each do |tutor|
  2. tutor.generate_tutor_search_cache
  3. tutor.rates_count = tutor.feedbacks.positive.count - tutor.feedbacks.negative.count
  4. tutor.opinions_count = tutor.feedbacks.with_opinion.count
  5. tutor.save
  6. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement