Permalink
Browse files

Cleanups in comment about conditional

  • Loading branch information...
1 parent 9ed3aab commit 66b1c2d3b5fbca53d0627a3332e6d3c25edc8b6b @guilleiguaran guilleiguaran committed Dec 3, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 actionpack/lib/action_controller/metal/rendering.rb
@@ -34,7 +34,8 @@ def render_to_body(options = {})
def _process_format(format)
super
- self.content_type ||= format.to_s unless format.nil? #here test if format is Mime::NullTye istance, no if is a NillClass or FalseClass
+ # format is a Mime::NullType instance here then this condition can't be changed to `if format`
+ self.content_type ||= format.to_s unless format.nil?
@carlosantoniodasilva

carlosantoniodasilva Dec 3, 2013

Owner

I'm not sure how that improves over the is_a? check, since we're needing to specifically call nil? to check this =(

end
# Normalize arguments by catching blocks and setting them on :update.

0 comments on commit 66b1c2d

Please sign in to comment.