diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2012-02-21 23:55:56 -0200 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2012-02-22 11:12:03 -0200 |
commit | 157ea763060e90f3aba0ff5af15d5dcb0f0c9c35 (patch) | |
tree | 5d2a3cb89c5f29f74419c42cdd7482891be56ea1 /actionpack/lib/action_controller | |
parent | a95f730ea45f01744702849fc084b4d28c857964 (diff) | |
download | rails-157ea763060e90f3aba0ff5af15d5dcb0f0c9c35.tar.gz rails-157ea763060e90f3aba0ff5af15d5dcb0f0c9c35.tar.bz2 rails-157ea763060e90f3aba0ff5af15d5dcb0f0c9c35.zip |
format lookup for partials is derived from the format in which the template is being rendered
Closes #5025 part 2
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/metal/mime_responds.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_controller/metal/rendering.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/metal/mime_responds.rb b/actionpack/lib/action_controller/metal/mime_responds.rb index 80ecc16d53..55de7e7d8e 100644 --- a/actionpack/lib/action_controller/metal/mime_responds.rb +++ b/actionpack/lib/action_controller/metal/mime_responds.rb @@ -280,7 +280,7 @@ module ActionController #:nodoc: if format self.content_type ||= format.to_s - lookup_context.freeze_formats([format.to_sym]) + lookup_context.formats = [format.to_sym] collector else head :not_acceptable diff --git a/actionpack/lib/action_controller/metal/rendering.rb b/actionpack/lib/action_controller/metal/rendering.rb index a677cdf15d..c5e7d4e357 100644 --- a/actionpack/lib/action_controller/metal/rendering.rb +++ b/actionpack/lib/action_controller/metal/rendering.rb @@ -14,7 +14,7 @@ module ActionController def render(*args) #:nodoc: raise ::AbstractController::DoubleRenderError if response_body super - self.content_type ||= Mime[formats.first].to_s + self.content_type ||= Mime[lookup_context.rendered_format].to_s response_body end |