mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
reduce function calls on Array
This commit is contained in:
@@ -441,9 +441,8 @@ module ActionController
|
||||
#
|
||||
# Returns String.
|
||||
def encode_credentials(token, options = {})
|
||||
values = ["token=#{token.to_s.inspect}"]
|
||||
options.each do |key, value|
|
||||
values << "#{key}=#{value.to_s.inspect}"
|
||||
values = ["token=#{token.to_s.inspect}"] + options.map do |key, value|
|
||||
"#{key}=#{value.to_s.inspect}"
|
||||
end
|
||||
"Token #{values * ", "}"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user