diff options
author | José Valim <jose.valim@gmail.com> | 2010-01-23 17:13:25 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-01-23 17:13:25 +0100 |
commit | 924fa084e81b8b2f5ae9eab93d6b711c2b6b89d8 (patch) | |
tree | 877c0c8305297d938c57c55c716666869648857a /railties/lib/rails/application/finisher.rb | |
parent | 13d66cdf2544af0d465d596383743b16b5005996 (diff) | |
download | rails-924fa084e81b8b2f5ae9eab93d6b711c2b6b89d8.tar.gz rails-924fa084e81b8b2f5ae9eab93d6b711c2b6b89d8.tar.bz2 rails-924fa084e81b8b2f5ae9eab93d6b711c2b6b89d8.zip |
First steps into making Plugin < Engine.
Diffstat (limited to 'railties/lib/rails/application/finisher.rb')
-rw-r--r-- | railties/lib/rails/application/finisher.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/railties/lib/rails/application/finisher.rb b/railties/lib/rails/application/finisher.rb index 4e7fffd0b3..2ac881ac11 100644 --- a/railties/lib/rails/application/finisher.rb +++ b/railties/lib/rails/application/finisher.rb @@ -3,6 +3,18 @@ module Rails module Finisher include Initializable + initializer :ensure_load_once_paths_as_subset do + extra = ActiveSupport::Dependencies.load_once_paths - + ActiveSupport::Dependencies.load_paths + + unless extra.empty? + abort <<-end_error + load_once_paths must be a subset of the load_paths. + Extra items in load_once_paths: #{extra * ','} + end_error + end + end + initializer :add_builtin_route do |app| if Rails.env.development? app.config.action_dispatch.route_files << File.join(RAILTIES_PATH, 'builtin', 'routes.rb') |