Skip to content

Instantly share code, notes, and snippets.

@qoobaa
Created January 12, 2017 10:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save qoobaa/862f651abdcb79e8420845b764cc3b99 to your computer and use it in GitHub Desktop.
Save qoobaa/862f651abdcb79e8420845b764cc3b99 to your computer and use it in GitHub Desktop.
User.where(weight_unit: "lbs").where.not(weight: nil).find_each { |u| u.athlete_profile.update!(precise_weight: (u.weight * 0.45359237).round(1)) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment