Skip to content

Commit 606c0f0

Browse files
committed
tests: fix rails app config deprecation
1 parent c452094 commit 606c0f0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/dummy_rails/config/environments/production.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,13 @@
2020
# config.action_dispatch.rack_cache = true
2121

2222
# Disable Rails's static asset server (Apache or nginx will already do this).
23-
config.serve_static_assets = false
23+
if config.respond_to?(:serve_static_files)
24+
# rails >= 4.2
25+
config.serve_static_files = true
26+
elsif config.respond_to?(:serve_static_assets)
27+
# rails < 4.2
28+
config.serve_static_assets = true
29+
end
2430

2531
# Compress JavaScripts and CSS.
2632
config.assets.js_compressor = :uglifier

0 commit comments

Comments
 (0)