aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view.rb
diff options
context:
space:
mode:
authorPiotr Sarnacki <drogus@gmail.com>2013-05-04 15:09:22 +0200
committerŁukasz Strzałkowski <lukasz.strzalkowski@gmail.com>2013-06-20 17:23:15 +0200
commit0d6e8edc2a47a4b4c6824936632bfb83850db343 (patch)
tree8829bfb94756e48e9489c4e8d22bb41df251bc81 /actionview/lib/action_view.rb
parent78b0934dd1bb84e8f093fb8ef95ca99b297b51cd (diff)
downloadrails-0d6e8edc2a47a4b4c6824936632bfb83850db343.tar.gz
rails-0d6e8edc2a47a4b4c6824936632bfb83850db343.tar.bz2
rails-0d6e8edc2a47a4b4c6824936632bfb83850db343.zip
Move actionpack/lib/action_view* into actionview/lib
Diffstat (limited to 'actionview/lib/action_view.rb')
-rw-r--r--actionview/lib/action_view.rb73
1 files changed, 71 insertions, 2 deletions
diff --git a/actionview/lib/action_view.rb b/actionview/lib/action_view.rb
index d6cdd61bbf..4aafbcb655 100644
--- a/actionview/lib/action_view.rb
+++ b/actionview/lib/action_view.rb
@@ -1,5 +1,5 @@
#--
-# Copyright (c) 2004-2012 David Heinemeier Hansson
+# Copyright (c) 2004-2013 David Heinemeier Hansson
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -21,4 +21,73 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#++
-require 'action_view/version'
+require 'active_support'
+require 'active_support/rails'
+require 'action_pack'
+
+module ActionView
+ extend ActiveSupport::Autoload
+
+ eager_autoload do
+ autoload :Base
+ autoload :Context
+ autoload :CompiledTemplates, "action_view/context"
+ autoload :Digestor
+ autoload :Helpers
+ autoload :LookupContext
+ autoload :PathSet
+ autoload :RecordIdentifier
+ autoload :RoutingUrlFor
+ autoload :Template
+
+ autoload_under "renderer" do
+ autoload :Renderer
+ autoload :AbstractRenderer
+ autoload :PartialRenderer
+ autoload :TemplateRenderer
+ autoload :StreamingTemplateRenderer
+ end
+
+ autoload_at "action_view/template/resolver" do
+ autoload :Resolver
+ autoload :PathResolver
+ autoload :FileSystemResolver
+ autoload :OptimizedFileSystemResolver
+ autoload :FallbackFileSystemResolver
+ end
+
+ autoload_at "action_view/buffers" do
+ autoload :OutputBuffer
+ autoload :StreamingBuffer
+ end
+
+ autoload_at "action_view/flows" do
+ autoload :OutputFlow
+ autoload :StreamingFlow
+ end
+
+ autoload_at "action_view/template/error" do
+ autoload :MissingTemplate
+ autoload :ActionViewError
+ autoload :EncodingError
+ autoload :MissingRequestError
+ autoload :TemplateError
+ autoload :WrongEncodingError
+ end
+ end
+
+ autoload :TestCase
+
+ ENCODING_FLAG = '#.*coding[:=]\s*(\S+)[ \t]*'
+
+ def self.eager_load!
+ super
+ ActionView::Template.eager_load!
+ end
+end
+
+require 'active_support/core_ext/string/output_safety'
+
+ActiveSupport.on_load(:i18n) do
+ I18n.load_path << "#{File.dirname(__FILE__)}/action_view/locale/en.yml"
+end