Skip to content

Refactor: Rename UserToCourse to Enrollment (Fable 5)#491

Merged
cycomachead merged 1 commit into
mainfrom
cycomachead/163-refactor-usertocourse-to-enrollment/2
Jul 4, 2026
Merged

Refactor: Rename UserToCourse to Enrollment (Fable 5)#491
cycomachead merged 1 commit into
mainfrom
cycomachead/163-refactor-usertocourse-to-enrollment/2

Conversation

@cycomachead

Copy link
Copy Markdown
Contributor

General Info

Changes

Renames the UserToCourse model, table, and all associated references to Enrollment throughout the codebase. The previous name was an implementation detail that didn't reflect domain language — Enrollment is clearer and more idiomatic.

Specifically, this includes:

  • Database: New migration renames user_to_courses table to enrollments; schema updated accordingly
  • Models: UserToCourseEnrollment, user_to_courses associations → enrollments on both Course and User
  • Controllers: UserToCoursesControllerEnrollmentsController; all references to UserToCourse updated across CoursesController, RequestsController, SessionController, CanvasFacade, and the API controllers
  • Routes: resources :user_to_coursesresources :enrollments
  • Views: Updated route helpers and loop variables (user_to_courseenrollment)
  • Tests & Factories: Renamed spec files, factory (:user_to_course:enrollment), and all inline references

Testing

Existing test suite covers the renamed model and controller. All specs and Cucumber step definitions have been updated to use the new naming. No behavioral changes were made — this is a pure rename refactor.

Documentation

No external documentation changes required. Code comments referencing UserToCourse have been updated inline.

Checklist

  • Name of branch corresponds to story

Superconductor Ticket Implementation | App Preview | Guided Review

Rename the UserToCourse model, table, and associated controllers to
Enrollment to better reflect the domain logic. This includes updating
database schema, routes, associations, and test suites to use the new
naming convention.

Co-authored-by: Claude Code <noreply@anthropic.com>
@cycomachead cycomachead changed the title Refactor: Rename UserToCourse to Enrollment Refactor: Rename UserToCourse to Enrollment (Fable 5) Jul 4, 2026
@cycomachead
cycomachead merged commit 4c8ab71 into main Jul 4, 2026
13 checks passed
@cycomachead
cycomachead deleted the cycomachead/163-refactor-usertocourse-to-enrollment/2 branch July 4, 2026 03:22
superconductor-for-github Bot pushed a commit that referenced this pull request Jul 4, 2026
Slack conflict in Request#process_update resolved by keeping the
notify_slack helper (main's stale tail would have double-sent the message
and reintroduced the false "Failed to send Slack notification" log); its
1:1-style course.course_settings access lives in notify_slack, which
auto-merged. Renamed UserToCourse to Enrollment in branch-only code
(sandbox harness, new specs) and deduplicated staff_user_for_auto_approval
specs again.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@cycomachead cycomachead mentioned this pull request Jul 4, 2026
20 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant