From 2c01f2b4e9d4a95bb2baca8ae57209eb10aa78b2 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Sun, 23 Nov 2008 13:42:07 -0600 Subject: use autoload instead of explicit requires for ActionView --- actionpack/lib/action_view/template_handlers.rb | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'actionpack/lib/action_view/template_handlers.rb') diff --git a/actionpack/lib/action_view/template_handlers.rb b/actionpack/lib/action_view/template_handlers.rb index 6c8aa4c2a7..1052c4e75c 100644 --- a/actionpack/lib/action_view/template_handlers.rb +++ b/actionpack/lib/action_view/template_handlers.rb @@ -1,10 +1,13 @@ -require 'action_view/template_handler' -require 'action_view/template_handlers/builder' -require 'action_view/template_handlers/erb' -require 'action_view/template_handlers/rjs' - module ActionView #:nodoc: module TemplateHandlers #:nodoc: + autoload :ERB, 'action_view/template_handlers/erb' + autoload :RJS, 'action_view/template_handlers/rjs' + autoload :Builder, 'action_view/template_handlers/builder' + + # Legacy Compilable stub + module Compilable + end + def self.extended(base) base.register_default_template_handler :erb, TemplateHandlers::ERB base.register_template_handler :rjs, TemplateHandlers::RJS -- cgit v1.2.3