If I have a ViewComponent that calls a helper method (eg from app/helpers/application_helper.rb), the helper is normally reloaded on each page load, as expected.
However, if I load the preview page (eg http://localhost:3000/rails/view_components/example_component/default), the helper methods appear to be the helpers as they were at application-boot-time. Changes to app/helpers/application_helper.rb have no effect, and I have to restart my rails server before they're picked up.
Changes to the view-component code (eg app/components/example_component.rb) do get reloaded, however.
Is this expected behaviour? Some side-effect of inheriting the preview controller from Rails::ApplicationController?
The text was updated successfully, but these errors were encountered:
If I have a ViewComponent that calls a helper method (eg from app/helpers/application_helper.rb), the helper is normally reloaded on each page load, as expected.
However, if I load the preview page (eg http://localhost:3000/rails/view_components/example_component/default), the helper methods appear to be the helpers as they were at application-boot-time. Changes to app/helpers/application_helper.rb have no effect, and I have to restart my rails server before they're picked up.
Changes to the view-component code (eg app/components/example_component.rb) do get reloaded, however.
Is this expected behaviour? Some side-effect of inheriting the preview controller from Rails::ApplicationController?
The text was updated successfully, but these errors were encountered: