Browse files

Rendering a template from ActionView will default to looking for part…

…ials only in the current mime type.

  * The old behavior was tested only as a side-effect of a different test--the original tests remain;
    a new template in the XML mime was added.
  * If you are relying on the current behavior and object to this change, please participate in
  • Loading branch information...
wycats committed Aug 9, 2009
1 parent 33f01fb commit 964bc4e85517dbd45d86e91445b3b9aecde960d8
@@ -248,7 +248,7 @@ def view_paths=(paths)
def with_template(current_template)
last_template, self.template = template, current_template
- last_formats, self.formats = formats, [current_template.mime_type.to_sym] + Mime::SET.symbols
+ last_formats, self.formats = formats, current_template.formats
self.template, self.formats = last_template, last_formats
@@ -15,7 +15,9 @@ def identifier() self end
def render(*) self end
def mime_type() @content_type end
+ def formats() [mime_type] end
def partial?() false end
@@ -0,0 +1 @@
+<p>This is grand!</p>

0 comments on commit 964bc4e

Please sign in to comment.