-
Notifications
You must be signed in to change notification settings - Fork 479
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
Remove WorkshopAutoenrolledApplication class #26789
Conversation
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.
Great cleanup! I think most of my nits here are existing issues that just got moved to a new place, but I do want to make sure we preserve test coverage of the default workshop business logic.
dashboard/app/models/pd/application/facilitator_application_base.rb
Outdated
Show resolved
Hide resolved
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.
👍 Yay removing dead code!
include Pd::FacilitatorCommonApplicationConstants | ||
|
||
serialized_attrs %w( | ||
pd_workshop_id |
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.
should this just go on PdWorkshopHelper
?
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.
Having this as a serialized attribute means that the models that use our helper would have to have a properties
column and include (or the module could include) SerializedProperties
. does that make this helper depend too much on the models? I am leaning towards keeping this in the models.
serialized_attrs %w( | ||
auto_assigned_enrollment_id | ||
) | ||
|
||
# @override |
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.
I assume that this code will never get executed in real life again because it's 1819? If it is dead code, should we remove it completely instead of updating it? (I guess "removing" could be deleting the route configs so request won't hit this code path.)
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.
Since instances of these models still exist in our database, and at some point we plan to allow partners to download CSVs of their past applications, I want to preserve the data, including the associations between these models.
Currently, no routes are loading these applications.
8914597
to
dde2e4b
Compare
Previously, teacher and facilitator applications both inherited from
WorkshopAutoenrolledApplication
, which inherited fromApplicationBase
. We no longer have the concept of an autoenrollment, so I removed all code relating to autoenrolling and moved the remaining shared functionality into a module calledPd::Application::PdWorkshopHelper
(open to better names - this module does caching as well) that bothTeacherApplicationBase
andFacilitatorApplicationBase
include.