Changeset 8791
- Timestamp:
- 02/03/08 01:11:42 (7 months ago)
- Files:
-
- trunk/actionpack/lib/action_view/base.rb (modified) (2 diffs)
- trunk/actionpack/lib/action_view/helpers/cache_helper.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/lib/action_view/base.rb
r8689 r8791 159 159 160 160 attr_writer :template_format 161 attr_accessor :current_render_extension 161 162 162 163 # Specify trim mode for the ERB compiler. Defaults to '-'. … … 359 360 def render_template(template_extension, template, file_path = nil, local_assigns = {}) #:nodoc: 360 361 handler = self.class.handler_class_for_extension(template_extension).new(self) 362 @current_render_extension = template_extension 361 363 362 364 if handler.compilable? trunk/actionpack/lib/action_view/helpers/cache_helper.rb
r8683 r8791 33 33 # <% end %> 34 34 def cache(name = {}, options = nil, &block) 35 template_extension = @finder.pick_template_extension(first_render)[/\.?(\w+)$/, 1].to_sym 36 handler = Base.handler_class_for_extension(template_extension) 35 handler = Base.handler_class_for_extension(current_render_extension.to_sym) 37 36 handler.new(@controller).cache_fragment(block, name, options) 38 37 end