Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

There's no need for ternary op here

  • Loading branch information...
commit 6e559168dc68a32bdbdf87e26ebfcb464be7e886 1 parent 559c429
Santiago Pastorino spastorino authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  actionpack/lib/action_controller/metal/mime_responds.rb
2  actionpack/lib/action_controller/metal/mime_responds.rb
View
@@ -291,7 +291,7 @@ def any(*args, &block)
alias :all :any
def custom(mime_type, &block)
- mime_type = mime_type.is_a?(Mime::Type) ? mime_type : Mime::Type.lookup(mime_type.to_s)
+ mime_type = Mime::Type.lookup(mime_type.to_s) unless mime_type.is_a?(Mime::Type)
@order << mime_type
@responses[mime_type] ||= block
end
Please sign in to comment.
Something went wrong with that request. Please try again.