-
-
Save osnysantos/8d110810ee33760e4ee6b372c825da4d to your computer and use it in GitHub Desktop.
This file contains 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
User.all.each do |user| | |
# set city on user table from first address association | |
user.update_column(:city, user.address.first.city) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment