aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/fixtures
diff options
context:
space:
mode:
authorPiotr Sarnacki <drogus@gmail.com>2012-03-26 22:37:36 +0200
committerPiotr Sarnacki <drogus@gmail.com>2012-03-27 12:14:56 +0200
commit67b2404cf9b2c7e0f86bf0294571ef97391a6dcd (patch)
tree9af9c8c3b057426cc13448d0c8e9769d1eeb60d3 /actionpack/test/fixtures
parent19901c6c61d1900a1452c8b14943a8345463f039 (diff)
downloadrails-67b2404cf9b2c7e0f86bf0294571ef97391a6dcd.tar.gz
rails-67b2404cf9b2c7e0f86bf0294571ef97391a6dcd.tar.bz2
rails-67b2404cf9b2c7e0f86bf0294571ef97391a6dcd.zip
If partial is rendered in controller, grab format from template
Previously `rendered_format` was set only based on mime types passed in Accept header, which was wrong if first type from Accept was different than rendered partial. The fix is to simply move setting rendered_format to the place where template is available and grab format from the template. If it fails we can fallback to formats passed by Accept header.
Diffstat (limited to 'actionpack/test/fixtures')
-rw-r--r--actionpack/test/fixtures/test/_partial_html_erb.html.erb1
1 files changed, 1 insertions, 0 deletions
diff --git a/actionpack/test/fixtures/test/_partial_html_erb.html.erb b/actionpack/test/fixtures/test/_partial_html_erb.html.erb
new file mode 100644
index 0000000000..4b54875782
--- /dev/null
+++ b/actionpack/test/fixtures/test/_partial_html_erb.html.erb
@@ -0,0 +1 @@
+<%= "partial.html.erb" %>