lib/jets/application.rb in jets-1.8.14 vs lib/jets/application.rb in jets-1.9.0

- old
+ new

@@ -187,13 +187,17 @@ end end def setup_auto_load_paths autoload_paths = config.autoload_paths + config.extra_autoload_paths - # internal_autoload_paths are last - autoload_paths += internal_autoload_paths - ActiveSupport::Dependencies.autoload_paths += autoload_paths + autoload_paths += internal_autoload_paths # internal_autoload_paths are last + autoload_paths.each do |path| + next unless File.exist?(path) + Jets.loader.push_dir(path) + end + Jets.loader.enable_reloading if Jets.env.development? + Jets.loader.setup end # Essentially folders under app folder will be the default_autoload_paths. Example: # app/controllers # app/helpers @@ -214,9 +218,13 @@ # Handle concerns folders Dir.glob("#{Jets.root}/app/**/concerns").each do |p| p.sub!('./','') paths << p unless exclude_autoload_path?(p) end + + paths << "#{Jets.root}/app/shared/resources" + paths << "#{Jets.root}/app/shared/extensions" + paths end def exclude_autoload_path?(path) path =~ %r{app/javascript} || path =~ %r{app/views}