diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2015-09-08 14:57:33 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2015-09-08 16:14:41 -0700 |
commit | cd8eb351fb514a0e7225cb548e5eec082a0b495e (patch) | |
tree | dc24658a392491f539a31b3ab54d1a2f9c4c3be1 /actionpack/lib/abstract_controller | |
parent | 7056e2aa18647319eb5a5e4cce34ed2d3d3553d7 (diff) | |
download | rails-cd8eb351fb514a0e7225cb548e5eec082a0b495e.tar.gz rails-cd8eb351fb514a0e7225cb548e5eec082a0b495e.tar.bz2 rails-cd8eb351fb514a0e7225cb548e5eec082a0b495e.zip |
push content_type assigment in to metal
everything above metal really doesn't care about setting the content
type, so lets rearrange these methods to be in metal.
Diffstat (limited to 'actionpack/lib/abstract_controller')
-rw-r--r-- | actionpack/lib/abstract_controller/rendering.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/lib/abstract_controller/rendering.rb b/actionpack/lib/abstract_controller/rendering.rb index de00ffb0f9..6c0a072b73 100644 --- a/actionpack/lib/abstract_controller/rendering.rb +++ b/actionpack/lib/abstract_controller/rendering.rb @@ -24,9 +24,9 @@ module AbstractController options = _normalize_render(*args, &block) self.response_body = render_to_body(options) if options[:html] - _set_content_type Mime::HTML.to_s + _set_html_content_type else - _set_content_type _get_content_type(rendered_format) + _set_rendered_content_type rendered_format end self.response_body end @@ -106,10 +106,10 @@ module AbstractController def _process_format(format) end - def _get_content_type(rendered_format) # :nodoc: + def _set_html_content_type # :nodoc: end - def _set_content_type(type) # :nodoc: + def _set_rendered_content_type(format) # :nodoc: end # Normalize args and options. |