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
# fetchs SIB Campaigns | |
def fetch | |
# update/create | |
campaign_records.each do |record| | |
shoot = Shoot.find_or_initialize_by(campaign_id: record[:id]) | |
unless shoot.update(record) | |
# the data was invalid, so the shoot wasn't saved, do something about that here | |
end | |
end |