diff options
author | Joshua Peek <josh@joshpeek.com> | 2011-03-29 21:16:44 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2011-03-29 21:16:44 -0500 |
commit | 612454e00ee4ff48c4e03f8d8daf92c2a2d3ae3f (patch) | |
tree | a607dc09ac72b308893ad4d06052e2281b551cea /railties/lib/rails/application | |
parent | db3e310d6b327b2b58cfbc0318abd3b4ddca5e30 (diff) | |
download | rails-612454e00ee4ff48c4e03f8d8daf92c2a2d3ae3f.tar.gz rails-612454e00ee4ff48c4e03f8d8daf92c2a2d3ae3f.tar.bz2 rails-612454e00ee4ff48c4e03f8d8daf92c2a2d3ae3f.zip |
Move sprockets initializers back to application
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 | 8 |
2 files changed, 12 insertions, 1 deletions
diff --git a/railties/lib/rails/application/configuration.rb b/railties/lib/rails/application/configuration.rb index c74bcbedf2..8dbc596357 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, + :use_sprockets, :compile_assets attr_writer :log_level @@ -28,6 +29,8 @@ module Rails @log_level = nil @middleware = app_middleware @generators = app_generators + @use_sprockets = false + @compile_assets = [] end def compiled_asset_path diff --git a/railties/lib/rails/application/finisher.rb b/railties/lib/rails/application/finisher.rb index a45b61c99c..b57af48615 100644 --- a/railties/lib/rails/application/finisher.rb +++ b/railties/lib/rails/application/finisher.rb @@ -33,6 +33,14 @@ module Rails end end + initializer :add_sprockets_route do |app| + if config.use_sprockets + app.routes.append do + mount app.assets => "/assets" + end + end + end + initializer :build_middleware_stack do build_middleware_stack end |