0
@@ -183,8 +183,6 @@ module ActionView #:nodoc:
0
cattr_accessor :erb_variable
0
delegate :request_forgery_protection_token, :to => :controller
0
- @@template_handlers = HashWithIndifferentAccess.new
0
module CompiledTemplates #:nodoc:
0
# holds compiled template code
0
@@ -201,9 +199,6 @@ module ActionView #:nodoc:
0
cattr_reader :computed_public_paths
0
@@computed_public_paths = {}
0
- @@template_handlers = {}
0
- @@default_template_handlers = nil
0
class ObjectWrapper < Struct.new(:value) #:nodoc:
0
@@ -218,39 +213,6 @@ module ActionView #:nodoc:
0
- # Register a class that knows how to handle template files with the given
0
- # extension. This can be used to implement new template types.
0
- # The constructor for the class must take the ActiveView::Base instance
0
- # as a parameter, and the class must implement a #render method that
0
- # takes the contents of the template to render as well as the Hash of
0
- # local assigns available to the template. The #render method ought to
0
- # return the rendered template as a string.
0
- def self.register_template_handler(extension, klass)
0
- @@template_handlers[extension.to_sym] = klass
0
- TemplateFinder.update_extension_cache_for(extension.to_s)
0
- def self.template_handler_extensions
0
- @@template_handlers.keys.map(&:to_s).sort
0
- def self.register_default_template_handler(extension, klass)
0
- register_template_handler(extension, klass)
0
- @@default_template_handlers = klass
0
- def self.handler_class_for_extension(extension)
0
- (extension && @@template_handlers[extension.to_sym]) || @@default_template_handlers
0
- register_default_template_handler :erb, TemplateHandlers::ERB
0
- register_template_handler :rjs, TemplateHandlers::RJS
0
- register_template_handler :builder, TemplateHandlers::Builder
0
- # TODO: Depreciate old template extensions
0
- register_template_handler :rhtml, TemplateHandlers::ERB
0
- register_template_handler :rxml, TemplateHandlers::Builder
0
def initialize(view_paths = [], assigns_for_first_render = {}, controller = nil)#:nodoc:
0
@assigns = assigns_for_first_render
Comments
No one has commented yet.