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
Fix bug where school doesn't show up in PD auto emails. #16794
Conversation
ea6545d
to
d03f590
Compare
In the process I cleaned up some of the enrollment validations, moving toward allowing old enrollments with old rules to be grandfathered in and validating new ones more strictly. I also added a default |
@@ -6,7 +6,6 @@ class Api::V1::Pd::WorkshopEnrollmentsControllerTest < ::ActionController::TestC | |||
@facilitator = create :facilitator | |||
|
|||
@workshop = create :pd_workshop, organizer: @organizer, facilitators: [@facilitator] | |||
@school_info = create :school_info_without_country |
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 was unused
@@ -222,6 +221,19 @@ def self.get_safe_names | |||
all.map {|enrollment| [enrollment.full_name, enrollment]} | |||
end | |||
|
|||
# TODO: Delete school column | |||
def school | |||
ActiveSupport::Deprecation.warn('School is deprecated. Use school_info or school_name instead.') |
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.
You should still return school here for now
@@ -222,6 +221,19 @@ def self.get_safe_names | |||
all.map {|enrollment| [enrollment.full_name, enrollment]} | |||
end | |||
|
|||
# TODO: Delete school column |
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.
We just need to make sure that getting rid of the column waits on making use of the existing school data (which is on my plate soon)
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.
LGTM, thanks for adding good test coverage for the changes!
Add helper methods and tests.
Bug
Now, the mail preview looks like this: