mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
There's no need for ternary op here
This commit is contained in:
parent
559c4292bc
commit
6e559168dc
1 changed files with 1 additions and 1 deletions
|
@ -291,7 +291,7 @@ module ActionController #:nodoc:
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue