Changeset 1226

Show
Ignore:
Timestamp:
01/09/08 10:04:41 (8 months ago)
Author:
wyca..@gmail.com
Message:

Fixes explicit :format in partial being ignored

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/merb/mixins/inline_partial.rb

    r1208 r1226  
    77 
    88    found_template = @web_controller._cached_partials["#{template}.#{@_template_format}"] ||= 
    9       @web_controller.send(:find_partial, template
     9      @web_controller.send(:find_partial, template, opts
    1010 
    1111    template_method = found_template.gsub(/[^\.a-zA-Z0-9]/, "__").gsub(/\./, "_") 
  • trunk/lib/merb/mixins/render.rb

    r1206 r1226  
    422422      # template_name.format.engine convention 
    423423      def glob_template(path, opts = {}) 
    424         the_template = "#{path}.#{@_template_format}" 
     424        the_template = "#{path}.#{opts[:format] || @_template_format}" 
    425425        Merb::AbstractController._template_path_cache[the_template] || (@_merb_unmatched = (the_template + ".*"); nil) 
    426426      end