Steps to reproduce
When inheriting view component from another Rails gem, I was expecting to be able to override a component's partial in my local app. For example:
Given:
[gem_home]/app/components/some_component.html.erb
A local file with the same name and location:
app/components/some_component.html.erb
Would replace/override the content of the gem's partial.
Expected behavior
I was expecting what Rails does with other types such as views, and replace/override the content of the gem's partial.
Actual behavior
It doesn't seem to. I can sub-class the gem's component Ruby class and write my own partial, which is fine, but I'm wondering if this is a bug and we should expect overriding things the way we typically to with other things.
System configuration
Rails version: 6.0.3.2
Ruby version: 2.6.6p146
Gem version: 2.14.0
Steps to reproduce
When inheriting view component from another Rails gem, I was expecting to be able to override a component's partial in my local app. For example:
Given:
[gem_home]/app/components/some_component.html.erbA local file with the same name and location:
app/components/some_component.html.erbWould replace/override the content of the gem's partial.
Expected behavior
I was expecting what Rails does with other types such as views, and replace/override the content of the gem's partial.
Actual behavior
It doesn't seem to. I can sub-class the gem's component Ruby class and write my own partial, which is fine, but I'm wondering if this is a bug and we should expect overriding things the way we typically to with other things.
System configuration
Rails version: 6.0.3.2
Ruby version: 2.6.6p146
Gem version: 2.14.0