diff options
Diffstat (limited to 'railties/lib/rails/engine.rb')
-rw-r--r-- | railties/lib/rails/engine.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index de16c55990..49553a57f3 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -256,7 +256,11 @@ module Rails end def config - @config ||= Engine::Configuration.new(find_root_with_flag("lib")) + @config ||= begin + config = Engine::Configuration.new(find_root_with_flag("lib")) + config.asset_path = "/#{engine_name}%s" if File.exists?(config.paths.public.to_a.first) + config + end end # Add configured load paths to ruby load paths and remove duplicates. |