Skip to content

Instantly share code, notes, and snippets.

@apatten
Created September 14, 2012 16:56
Show Gist options
  • Save apatten/3723219 to your computer and use it in GitHub Desktop.
Save apatten/3723219 to your computer and use it in GitHub Desktop.
Estimate.excludes(score: nil).all.each do |estimate|
estimate.wallstreet_eps_score_delta = estimate.eps_score - estimate.release.wallstreet_eps_score
estimate.wallstreet_revenue_score_delta = estimate.revenue_score - estimate.release.wallstreet_revenue_score
estimate.wallstreet_score_delta = estimate.score - estimate.release.wallstreet_score
estimate.save
end
User.all.each do |user|
user.estimates_count = user.estmates.count
user.save
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment