aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2008-07-03 21:08:27 -0500
committerJoshua Peek <josh@joshpeek.com>2008-07-03 21:09:37 -0500
commit01637796d712943ebf9e9a76aa5c708edfab4d02 (patch)
tree44144464c4d6d65a050dcdfa90b01fc2fd1ff19a /actionpack/lib/action_view
parentbad1eac91d1549631dca8e93e7e846911649acf7 (diff)
downloadrails-01637796d712943ebf9e9a76aa5c708edfab4d02.tar.gz
rails-01637796d712943ebf9e9a76aa5c708edfab4d02.tar.bz2
rails-01637796d712943ebf9e9a76aa5c708edfab4d02.zip
Revert "Moved TemplateHandlers to Base"
This reverts commit 42d215a925a228778e43f7040f03ad8f3eb5341c. Conflicts: actionpack/lib/action_view/inline_template.rb actionpack/lib/action_view/template.rb
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r--actionpack/lib/action_view/base.rb1
-rw-r--r--actionpack/lib/action_view/helpers/cache_helper.rb2
-rw-r--r--actionpack/lib/action_view/inline_template.rb2
-rw-r--r--actionpack/lib/action_view/template.rb8
4 files changed, 4 insertions, 9 deletions
diff --git a/actionpack/lib/action_view/base.rb b/actionpack/lib/action_view/base.rb
index 5a3fc4182f..d18c701619 100644
--- a/actionpack/lib/action_view/base.rb
+++ b/actionpack/lib/action_view/base.rb
@@ -151,7 +151,6 @@ module ActionView #:nodoc:
#
# See the ActionView::Helpers::PrototypeHelper::GeneratorMethods documentation for more details.
class Base
- extend TemplateHandlers
include ERB::Util
attr_accessor :base_path, :assigns, :template_extension, :first_render
diff --git a/actionpack/lib/action_view/helpers/cache_helper.rb b/actionpack/lib/action_view/helpers/cache_helper.rb
index c2aab5aa72..930c397785 100644
--- a/actionpack/lib/action_view/helpers/cache_helper.rb
+++ b/actionpack/lib/action_view/helpers/cache_helper.rb
@@ -32,7 +32,7 @@ module ActionView
# <i>Topics listed alphabetically</i>
# <% end %>
def cache(name = {}, options = nil, &block)
- handler = Base.handler_class_for_extension(current_render_extension.to_sym)
+ handler = Template.handler_class_for_extension(current_render_extension.to_sym)
handler.new(@controller).cache_fragment(block, name, options)
end
end
diff --git a/actionpack/lib/action_view/inline_template.rb b/actionpack/lib/action_view/inline_template.rb
index 19ab92ce1a..1ccb23a3fc 100644
--- a/actionpack/lib/action_view/inline_template.rb
+++ b/actionpack/lib/action_view/inline_template.rb
@@ -10,7 +10,7 @@ module ActionView #:nodoc:
@locals = locals || {}
@method_key = @source
- @handler = Base.handler_class_for_extension(@extension).new(@view)
+ @handler = Template.handler_class_for_extension(@extension).new(@view)
end
end
end
diff --git a/actionpack/lib/action_view/template.rb b/actionpack/lib/action_view/template.rb
index 8142232c8f..dbc8ccdee8 100644
--- a/actionpack/lib/action_view/template.rb
+++ b/actionpack/lib/action_view/template.rb
@@ -1,12 +1,8 @@
module ActionView #:nodoc:
class Template #:nodoc:
+ extend TemplateHandlers
include Renderer
- class << self
- # TODO: Deprecate
- delegate :register_template_handler, :to => 'ActionView::Base'
- end
-
attr_reader :path, :extension
def initialize(view, path, use_full_path = nil, locals = {})
@@ -25,7 +21,7 @@ module ActionView #:nodoc:
@method_key = @filename
@locals = locals || {}
- @handler = Base.handler_class_for_extension(@extension).new(@view)
+ @handler = self.class.handler_class_for_extension(@extension).new(@view)
end
def render_template