From b92841e7319f484ebca1b3b42ac7fa6591bdb8fe Mon Sep 17 00:00:00 2001 From: Peter Nagy Date: Fri, 27 Feb 2015 00:12:12 +0100 Subject: [PATCH] defined?(ActionDispatch::Static) is always true Instead check if we are serving static files, as that will explicitly means ActionDispatch::Static is loaded. --- lib/font_assets/railtie.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/font_assets/railtie.rb b/lib/font_assets/railtie.rb index efc801d..51e773e 100644 --- a/lib/font_assets/railtie.rb +++ b/lib/font_assets/railtie.rb @@ -8,7 +8,7 @@ class Railtie < Rails::Railtie config.font_assets.origin ||= "*" config.font_assets.options ||= { allow_ssl: true } - insert_target = if defined?(ActionDispatch::Static) + insert_target = if app.config.serve_static_files 'ActionDispatch::Static' else 'Rack::Runtime'