You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using ViewComponent, you'll have a .rb file in app/components, and a corresponding Rails view whose path is the same except for the file extension.
For example:
app/components/foo_component.rb
app/components/foo_component.html.erb
Is there a good way to go to the Ruby file when I'm in the view, and go to the view when I'm in the Ruby file? :A and :R both bring me to spec/components/foo_component_spec.rb when in the Ruby file and do nothing ("No alternate file defined") when in the view.
Given how controllers and views work with :R, I think :R would be a good fit for this.
The text was updated successfully, but these errors were encountered:
When using ViewComponent, you'll have a
.rb
file in app/components, and a corresponding Rails view whose path is the same except for the file extension.For example:
app/components/foo_component.rb
app/components/foo_component.html.erb
Is there a good way to go to the Ruby file when I'm in the view, and go to the view when I'm in the Ruby file?
:A
and:R
both bring me tospec/components/foo_component_spec.rb
when in the Ruby file and do nothing ("No alternate file defined") when in the view.Given how controllers and views work with
:R
, I think:R
would be a good fit for this.The text was updated successfully, but these errors were encountered: