diff options
Diffstat (limited to 'railties/lib/rails/engine.rb')
-rw-r--r-- | railties/lib/rails/engine.rb | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index 409502cb08..a602dac5ff 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -124,6 +124,11 @@ module Rails Pathname.new(root).expand_path : Pathname.new(root).realpath end + def endpoint(endpoint = nil) + @endpoint = endpoint if endpoint + @endpoint + end + protected def method_missing(*args, &block) @@ -162,12 +167,6 @@ module Rails self.class.endpoint || routes end - def default_middleware_stack - ActionDispatch::MiddlewareStack.new.tap do |middleware| - middleware.use ::ActionDispatch::Static, paths.public.to_a.first if config.serve_static_assets - end - end - def call(env) app.call(env) end @@ -251,6 +250,9 @@ module Rails end protected + def default_middleware_stack + ActionDispatch::MiddlewareStack.new + end def _all_autoload_paths @_all_autoload_paths ||= (config.autoload_paths + config.eager_load_paths + config.autoload_once_paths).uniq |