Created
November 6, 2023 15:20
-
-
Save zarembas/241b66f0be169473265845c2deb87287 to your computer and use it in GitHub Desktop.
[DfE] 2431-update-to-unpaid-experience-section.rb
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
attributes = { | |
role: 'text', | |
organisation: 'text', | |
details: 'text', | |
working_with_children: true, | |
start_date: '2023-10-01', | |
end_date: '2023-10-01', | |
start_date_unknown: false, | |
end_date_unknown: false, | |
currently_working: false, | |
} | |
application_form = ApplicationForm.find(:id) | |
ActiveRecord::Base.transaction do | |
application_form.application_volunteering_experiences.create!(attributes) | |
application_form.update!(volunteering_experience: true) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment