lib/rails/application.rb in railties-4.0.0 vs lib/rails/application.rb in railties-4.0.1.rc1
- old
+ new
@@ -243,11 +243,12 @@
railties.each { |r| r.run_tasks_blocks(app) }
super
require "rails/tasks"
config = self.config
task :environment do
- config.eager_load = false
+ ActiveSupport.on_load(:before_initialize) { config.eager_load = false }
+
require_environment!
end
end
def run_generators_blocks(app) #:nodoc:
@@ -315,12 +316,10 @@
if config.force_ssl
middleware.use ::ActionDispatch::SSL, config.ssl_options
end
- if config.action_dispatch.x_sendfile_header.present?
- middleware.use ::Rack::Sendfile, config.action_dispatch.x_sendfile_header
- end
+ middleware.use ::Rack::Sendfile, config.action_dispatch.x_sendfile_header
if config.serve_static_assets
middleware.use ::ActionDispatch::Static, paths["public"].first, config.static_cache_control
end