New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
standardize capitalization of 'Please Explain' in pd applications #21488
Conversation
Add a script to standardize the capitalizations for already-submitted applications |
588467f
to
3d91df1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good. You should get numbers on how many teacher applications and principal applications you will be updating before running this
# then update, save, and score its corresponding teacher application | ||
Pd::Application::PrincipalApproval1819Application.find_each do |principal_application| | ||
if principal_application.form_data.include?("(please explain)") | ||
principal_application.form_data = principal_application.form_data.gsub("(please explain)", "(Please Explain)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine. There's also an update_form_data_hash but since this is just a gsub its fine
principal_application.form_data = principal_application.form_data.gsub("(please explain)", "(Please Explain)") | ||
principal_application.save | ||
if principal_application.errors | ||
puts "principal app: #{principal_application.id} errors: #{principal_application.errors.full_messages}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you have an error here, consider not doing anything else with this application.
No description provided.