Skip to content
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...
1 parent 33f01fb commit 964bc4e85517dbd45d86e91445b3b9aecde960d8 @wycats wycats committed
2 actionpack/lib/action_view/base.rb
@@ -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
4 actionpack/lib/action_view/template/text.rb
@@ -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
1 actionpack/test/fixtures/test/greeting.xml.erb
@@ -0,0 +1 @@
+<p>This is grand!</p>

0 comments on commit 964bc4e

Please sign in to comment.
Something went wrong with that request. Please try again.