From 446b6855dc88715315ce1ea15c25d1e821f8e598 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Wed, 26 Aug 2015 16:17:29 -0700 Subject: remove useless code If AV::Rendering is mixed in, then `rendered_format` will be calculated based on the current `lookup_context`, but calling `_process_format` will set the `rendered_format` back on to the same lookup context where we got the information in the first place! Instead of getting information from an object, then setting the same information back on to that object, lets just do nothing instead! --- actionpack/lib/abstract_controller/rendering.rb | 1 - 1 file changed, 1 deletion(-) (limited to 'actionpack/lib/abstract_controller') diff --git a/actionpack/lib/abstract_controller/rendering.rb b/actionpack/lib/abstract_controller/rendering.rb index 765db74b2b..0a28c9aea1 100644 --- a/actionpack/lib/abstract_controller/rendering.rb +++ b/actionpack/lib/abstract_controller/rendering.rb @@ -23,7 +23,6 @@ module AbstractController def render(*args, &block) options = _normalize_render(*args, &block) self.response_body = render_to_body(options) - _process_format(rendered_format) if rendered_format if options[:plain] _set_content_type Mime::TEXT.to_s else -- cgit v1.2.3