aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/metal/rendering_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_controller/metal/rendering_controller.rb')
-rw-r--r--actionpack/lib/action_controller/metal/rendering_controller.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/metal/rendering_controller.rb b/actionpack/lib/action_controller/metal/rendering_controller.rb
index afd484b0ec..9e8bc82385 100644
--- a/actionpack/lib/action_controller/metal/rendering_controller.rb
+++ b/actionpack/lib/action_controller/metal/rendering_controller.rb
@@ -65,6 +65,10 @@ module ActionController
controller_path
end
+ def format_for_text
+ formats.first
+ end
+
def with_template_cache(name)
self.class.template_cache[Thread.current[:format_locale_key]][name] ||= super
end