Skip to content
Discussion options

You must be logged in to vote

@collimarco while this isn't the only reason, one cause for hesitation around introducing such a helper is that it likely would lead to ambiguous references to components.

For example, if I had a User::Avatar component and an Organization::Avatar component, which one would component :avatar render? I know that Rails supports ambiguous references to view files (like render :show and implicit rendering in controllers), but we do not allow this functionality in GitHub Rails applications: https://github.com/github/rubocop-github/blob/main/lib/rubocop/cop/github/rails_controller_render_literal.rb#L12.

Ambiguous references also make it difficult to pre-compiles Rails templates and components, l…

Replies: 4 comments 10 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@collimarco
Comment options

Comment options

You must be logged in to vote
3 replies
@collimarco
Comment options

@Spone
Comment options

Spone Dec 4, 2023
Maintainer

@collimarco
Comment options

Answer selected by joelhawksley
Comment options

You must be logged in to vote
6 replies
@joelhawksley
Comment options

@collimarco
Comment options

@digerata
Comment options

@joelhawksley
Comment options

@digerata
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
5 participants