Skip to content

Commit

Permalink
Merge pull request #51 from fxn/once
Browse files Browse the repository at this point in the history
Put app in autoload_once_paths
  • Loading branch information
dhh committed Dec 28, 2020
2 parents 5c49e57 + 6bb3685 commit b971774
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/turbo/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ class Engine < Rails::Engine
isolate_namespace Turbo
config.eager_load_namespaces << Turbo
config.turbo = ActiveSupport::OrderedOptions.new
config.autoload_once_paths = %W(
#{root}/app/channels
#{root}/app/controllers
#{root}/app/controllers/concerns
#{root}/app/helpers
#{root}/app/models
#{root}/app/models/concerns
#{root}/app/jobs
)

initializer "turbo.assets" do
if Rails.application.config.respond_to?(:assets)
Expand Down

0 comments on commit b971774

Please sign in to comment.