I followed this tutorial to import a csv file. The tutorial explains how to exclude certain fields:
Player.create!(player_hash.except("number"))
Is it possible to add certain fields when creating a new player from the cvs? For example: create a new player by getting the name from the cvs file and add the team_id that is not in the csv file. Something like this:
Player.create!(player_hash.add("team_id"))
But this throws an error:
undefined method 'add'
Is there a way to add a field?