Skip to content

Instantly share code, notes, and snippets.

@vassyz
Created November 6, 2023 15:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vassyz/241b66f0be169473265845c2deb87287 to your computer and use it in GitHub Desktop.
Save vassyz/241b66f0be169473265845c2deb87287 to your computer and use it in GitHub Desktop.
[DfE] 2431-update-to-unpaid-experience-section.rb
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