namespace :update do
desc "Update employer names"
task employer_names: :environment do
Employer.find_each do |employer|
names = employer.name.split
employer.update(first_name: names.first, last_name: names.drop(1).join(' '))
end