Menu

Part 2: Decoupling EE::Group URL Routing into Ai::DuoSettings::Paths Across 22 Files
📰

Part 2: Decoupling EE::Group URL Routing into Ai::DuoSettings::Paths Across 22 Files

DEV Community: gitlab·Pavan Kumar Sadashiv·5 days ago
#o5dMFsJj
#devtogitlab#devto#dev#js#duo_settings_path
Reading 0:00
15s threshold

Series Context: Part 2 of 10 in GitLab Core Engineering: Architecture, MCP & CI/CD Deep Dives .

Featured MR: gitlab-org/gitlab!269059 · Work Item: #636678

Models Should Know Identity, Not URL Routing Anchors

ActiveRecord models in Rails should not construct Rails URL helper paths with UI DOM anchors hardcoded into them. Yet inside ee/app/models/ee/group.rb , duo_settings_path had quietly lived for years:

# Before (ee/app/models/ee/group.rb) def duo_settings_path if :: GitlabSubscriptions :: SubscriptionHelper . gitlab_com_subscription? && root? :: Gitlab :: Routing . url_helpers . group_settings_gitlab_duo_configuration_index_path ( self ) else :: Gitlab :: Routing . url_helpers .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.