diff options
Diffstat (limited to 'railties/lib/rails/application')
-rw-r--r-- | railties/lib/rails/application/configuration.rb | 21 | ||||
-rw-r--r-- | railties/lib/rails/application/finisher.rb | 2 |
2 files changed, 17 insertions, 6 deletions
diff --git a/railties/lib/rails/application/configuration.rb b/railties/lib/rails/application/configuration.rb index 23b0e765ae..e5476fbe7a 100644 --- a/railties/lib/rails/application/configuration.rb +++ b/railties/lib/rails/application/configuration.rb @@ -4,12 +4,12 @@ require 'rails/engine/configuration' module Rails class Application class Configuration < ::Rails::Engine::Configuration - attr_accessor :allow_concurrency, :asset_host, :cache_classes, :cache_store, - :encoding, :consider_all_requests_local, :dependency_loading, - :filter_parameters, :helpers_paths, :logger, - :preload_frameworks, :reload_plugins, - :secret_token, :serve_static_assets, :session_options, - :time_zone, :whiny_nils, :force_ssl + attr_accessor :allow_concurrency, :asset_host, :asset_path, :assets, + :cache_classes, :cache_store, :consider_all_requests_local, + :dependency_loading, :encoding, :filter_parameters, + :force_ssl, :helpers_paths, :logger, :preload_frameworks, + :reload_plugins, :secret_token, :serve_static_assets, + :session_options, :time_zone, :whiny_nils attr_writer :log_level @@ -29,6 +29,12 @@ module Rails @log_level = nil @middleware = app_middleware @generators = app_generators + + @assets = ActiveSupport::OrderedOptions.new + @assets.enabled = false + @assets.paths = [] + @assets.precompile = [] + @assets.prefix = "/assets" end def compiled_asset_path @@ -56,6 +62,9 @@ module Rails paths.add "config/environment", :with => "config/environment.rb" paths.add "lib/templates" paths.add "log", :with => "log/#{Rails.env}.log" + paths.add "public" + paths.add "public/javascripts" + paths.add "public/stylesheets" paths.add "tmp" paths.add "tmp/cache" paths diff --git a/railties/lib/rails/application/finisher.rb b/railties/lib/rails/application/finisher.rb index a45b61c99c..bf865ce466 100644 --- a/railties/lib/rails/application/finisher.rb +++ b/railties/lib/rails/application/finisher.rb @@ -53,6 +53,8 @@ module Rails end # Force routes to be loaded just at the end and add it to to_prepare callbacks + # This needs to be after the finisher hook to ensure routes added in the hook + # are still loaded. initializer :set_routes_reloader do |app| reloader = lambda { app.routes_reloader.execute_if_updated } reloader.call |