aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/initializer.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2008-11-29 19:23:31 -0800
committerJeremy Kemper <jeremy@bitsweat.net>2008-11-29 19:23:31 -0800
commit9e4621d6f7b7e864c6463da065f17b8ee27ecb81 (patch)
tree1fed9f750487916d70d4bd8d5c484ed0e001e852 /railties/lib/initializer.rb
parent8521cebbad465ae0acba36bda3fd202a898d194a (diff)
parent1182658e767d2db4a46faed35f0b1075c5dd9a88 (diff)
downloadrails-9e4621d6f7b7e864c6463da065f17b8ee27ecb81.tar.gz
rails-9e4621d6f7b7e864c6463da065f17b8ee27ecb81.tar.bz2
rails-9e4621d6f7b7e864c6463da065f17b8ee27ecb81.zip
Merge branch 'master' of git@github.com:rails/rails
Diffstat (limited to 'railties/lib/initializer.rb')
-rw-r--r--railties/lib/initializer.rb23
1 files changed, 8 insertions, 15 deletions
diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb
index b0abf3379c..8e8bcf21fe 100644
--- a/railties/lib/initializer.rb
+++ b/railties/lib/initializer.rb
@@ -48,12 +48,8 @@ module Rails
end
end
- def root
- if defined?(RAILS_ROOT)
- RAILS_ROOT
- else
- nil
- end
+ def root(*args)
+ File.join(RAILS_ROOT, *args.compact) if defined?(RAILS_ROOT)
end
def env
@@ -372,9 +368,10 @@ Run `rake gems:install` to install the missing gems.
def load_view_paths
if configuration.frameworks.include?(:action_view)
- ActionView::PathSet::Path.eager_load_templates! if configuration.cache_classes
- ActionController::Base.view_paths.load if configuration.frameworks.include?(:action_controller)
- ActionMailer::Base.template_root.load if configuration.frameworks.include?(:action_mailer)
+ if configuration.cache_classes
+ ActionController::Base.view_paths.load if configuration.frameworks.include?(:action_controller)
+ ActionMailer::Base.template_root.load if configuration.frameworks.include?(:action_mailer)
+ end
end
end
@@ -487,12 +484,8 @@ Run `rake gems:install` to install the missing gems.
def initialize_routing
return unless configuration.frameworks.include?(:action_controller)
- ActionController::Routing.controller_paths = configuration.controller_paths + plugin_loader.controller_paths
-
- ([ configuration.routes_configuration_file ] + plugin_loader.routing_files).each do |routing_file|
- ActionController::Routing::Routes.add_configuration_file(routing_file)
- end
-
+ ActionController::Routing.controller_paths += configuration.controller_paths
+ ActionController::Routing::Routes.add_configuration_file(configuration.routes_configuration_file)
ActionController::Routing::Routes.reload
end