Repository navigation
feat(devise): Add types for URL helpers - #1096
Merged
Merged
Conversation
Devise includes Devise::Controllers::UrlHelpers into every controller and view via ActiveSupport.on_load(:action_controller) and on_load(:action_view), but the collection declared none of it, so scoped route proxies such as new_session_path(:user) and cancel_registration_url(:user) were unknown on ActionController::Base, ActionController::API and ActionView::Base. Declare the 28 path/url helpers that generate_helpers! defines from Devise::URL_HELPERS at load time, and include the module where devise does. OmniAuth's UrlHelpers are not covered. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EhUSLUimEYJyCZv8NdQGKb
apiology
marked this pull request as ready for review
October 13, 2026 14:41
|
@apiology Thanks for your contribution! Please follow the instructions below for each change. Available commandsYou can use the following commands by commenting on this PR.
|
Contributor
Author
|
/merge |
apiology
added a commit
to iftheshoefritz/solargraph-rails
that referenced
this pull request
Oct 14, 2026
* Bump gem_rbs_collection to c26eeb2 for devise URL helpers ruby/gem_rbs_collection#1096 added Devise::Controllers::UrlHelpers, so ActionController::Base#cancel_registration_path and #cancel_registration_url now resolve to String on Solargraph 0.60.4 and 0.61.0 instead of undefined. The other collection commits between c78df6c and c26eeb2 add Rails 8.1 types and unrelated gems; FORCE_UPDATE on 0.60.4 and 0.61.0 with Rails 8.0 changed no other entry. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EhUSLUimEYJyCZv8NdQGKb * Stop skipping the typed Devise URL helpers Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EhUSLUimEYJyCZv8NdQGKb --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Claude: This PR was written by Claude Code on behalf of @apiology.
Devise includes
Devise::Controllers::UrlHelpersinto every controller and view, but the devise RBS doesn't declare it, so Steep rejects scoped route proxies such asnew_session_path(:user)andcancel_registration_url(:user), and Solargraph can't infer their types:This adds
Devise::Controllers::UrlHelperswith the 28_path/_urlmethods thatgenerate_helpers!defines fromDevise::URL_HELPERSat load time (session, password, registration, confirmation, unlock). It includes the module intoActionController::Base,ActionController::APIandActionView::Base, matching devise'sDevise.include_helpershooks for:action_controllerand:action_view.Devise::OmniAuth::UrlHelpersis not covered.🤖 Generated with Claude Code