diff options
author | Łukasz Strzałkowski <lukasz.strzalkowski@gmail.com> | 2013-08-02 02:27:28 +0200 |
---|---|---|
committer | Łukasz Strzałkowski <lukasz.strzalkowski@gmail.com> | 2013-08-25 11:39:13 +0200 |
commit | 7d810049fe8905e3e96d0b2e989f562bb961e59e (patch) | |
tree | f835d0511c3c1f620307a5779e621e5a9fff988d /actionview | |
parent | 1b1c23599bf0b4c16fec260ed993b27a8cc92724 (diff) | |
download | rails-7d810049fe8905e3e96d0b2e989f562bb961e59e.tar.gz rails-7d810049fe8905e3e96d0b2e989f562bb961e59e.tar.bz2 rails-7d810049fe8905e3e96d0b2e989f562bb961e59e.zip |
Add #rendered_format method to controllers
Diffstat (limited to 'actionview')
-rw-r--r-- | actionview/lib/action_view/rendering.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/actionview/lib/action_view/rendering.rb b/actionview/lib/action_view/rendering.rb index fa1c984726..88a3de4a45 100644 --- a/actionview/lib/action_view/rendering.rb +++ b/actionview/lib/action_view/rendering.rb @@ -107,6 +107,10 @@ module ActionView view_renderer.render(view_context, options) end + def rendered_format + Mime[lookup_context.rendered_format] + end + def default_protected_instance_vars super.concat([:@_view_context_class, :@_view_renderer, :@_lookup_context]) end |