diff options
author | José Valim <jose.valim@gmail.com> | 2009-07-28 15:49:59 +0200 |
---|---|---|
committer | Yehuda Katz <wycats@gmail.com> | 2009-07-29 12:06:02 -0700 |
commit | 3f445b316d34a49a8b6f27bde72979828baefaa8 (patch) | |
tree | 9d11a12b9f289ad2f73c84e5b136c66f44c36149 /actionpack/test/controller | |
parent | c4d1075bd366e89a070afd5d6bf859af276c9507 (diff) | |
download | rails-3f445b316d34a49a8b6f27bde72979828baefaa8.tar.gz rails-3f445b316d34a49a8b6f27bde72979828baefaa8.tar.bz2 rails-3f445b316d34a49a8b6f27bde72979828baefaa8.zip |
Refactor Responder to only calculate available mime types. Those are sent to the controller that knows what to do with it (render a block or call default render).
Signed-off-by: Yehuda Katz <wycats@gmail.com>
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/mime_responds_test.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/test/controller/mime_responds_test.rb b/actionpack/test/controller/mime_responds_test.rb index 93ca34c41c..bee327998b 100644 --- a/actionpack/test/controller/mime_responds_test.rb +++ b/actionpack/test/controller/mime_responds_test.rb @@ -436,9 +436,9 @@ class MimeControllerTest < ActionController::TestCase def test_render_action_for_html @controller.instance_eval do def render(*args) - unless args.empty? - @action = args.first[:action] || action_name - end + @action = args.first[:action] unless args.empty? + @action ||= action_name + response.body = "#{@action} - #{@template.formats}" end end |