Created
August 22, 2018 12:51
-
-
Save ysv/ad5bc1ddd8a12871a2a932f756723862 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new_precision = 8 | |
markets=[] | |
Market.find_each do |m| | |
markets << m.as_json.slice("bid_unit", "ask_unit", "bid_fee", "ask_fee", "enabled", "position") | |
m.delete | |
end | |
markets.each do |m| | |
Market.create!(m.merge(ask_precision: new_precision, bid_precision: new_precision)) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment