Skip to content

Instantly share code, notes, and snippets.

@rishi-amura
Last active November 11, 2019 13:34
Show Gist options
  • Save rishi-amura/f38c675177268c1634f965ab78b4f760 to your computer and use it in GitHub Desktop.
Save rishi-amura/f38c675177268c1634f965ab78b4f760 to your computer and use it in GitHub Desktop.
[ESTATE-6703] Round off Saleable/Carpet/Loading values
# ESTATE-6703
Client.all.each do |client|
client.unit_configurations.each do |u|
u.update_attributes(saleable: u.saleable.round(4), carpet: u.carpet.round(4), loading: u.loading.round(4))
end
client.project_units.each do |pu|
pu.update_attributes(saleable: pu.saleable.round(4), carpet: pu.carpet.round(4), loading: pu.loading.round(4))
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment