Skip to content
  • Xavier Noria's avatar
    475169a9
    Add app/{helpers,models} to autoload_once_paths · 475169a9
    Xavier Noria authored
    The helpers of Action Text are added to a couple of non-reloadable
    base classes:
    
      initializer "action_text.helper" do
        %i[action_controller_base action_mailer].each do |abstract_controller|
          ActiveSupport.on_load(abstract_controller) do
            helper ActionText::Engine.helpers
          end
        end
      end
    
    Therefore, it does not make sense that they are reloadable themselves.
    
    For the same price, we can also make the models non-reloadable, thus
    saving parent applications from the unnecessary work of reloading this
    engine.
    
    We did this for turbo-rails as well.
    475169a9
    Add app/{helpers,models} to autoload_once_paths
    Xavier Noria authored
    The helpers of Action Text are added to a couple of non-reloadable
    base classes:
    
      initializer "action_text.helper" do
        %i[action_controller_base action_mailer].each do |abstract_controller|
          ActiveSupport.on_load(abstract_controller) do
            helper ActionText::Engine.helpers
          end
        end
      end
    
    Therefore, it does not make sense that they are reloadable themselves.
    
    For the same price, we can also make the models non-reloadable, thus
    saving parent applications from the unnecessary work of reloading this
    engine.
    
    We did this for turbo-rails as well.
Loading