diff options
Diffstat (limited to 'railties/lib/rails/application')
-rw-r--r-- | railties/lib/rails/application/configuration.rb | 5 | ||||
-rw-r--r-- | railties/lib/rails/application/finisher.rb | 14 |
2 files changed, 18 insertions, 1 deletions
diff --git a/railties/lib/rails/application/configuration.rb b/railties/lib/rails/application/configuration.rb index c74bcbedf2..9e87714e4f 100644 --- a/railties/lib/rails/application/configuration.rb +++ b/railties/lib/rails/application/configuration.rb @@ -9,7 +9,8 @@ module Rails :filter_parameters, :helpers_paths, :logger, :preload_frameworks, :reload_plugins, :secret_token, :serve_static_assets, :session_options, - :time_zone, :whiny_nils + :time_zone, :whiny_nils, + :asset_pipeline, :precompile_assets attr_writer :log_level @@ -28,6 +29,8 @@ module Rails @log_level = nil @middleware = app_middleware @generators = app_generators + @asset_pipeline = false + @precompile_assets = [] end def compiled_asset_path diff --git a/railties/lib/rails/application/finisher.rb b/railties/lib/rails/application/finisher.rb index a45b61c99c..3cfd8f5707 100644 --- a/railties/lib/rails/application/finisher.rb +++ b/railties/lib/rails/application/finisher.rb @@ -33,6 +33,20 @@ module Rails end end + initializer :add_sprockets_route do |app| + if config.asset_pipeline + app.routes.append do + mount app.assets => "/assets" + end + end + end + + initializer :set_sprockets_logger do |app| + if config.asset_pipeline + app.assets.logger = Rails.logger + end + end + initializer :build_middleware_stack do build_middleware_stack end |