aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/tagged_logging.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/tagged_logging.rb b/activesupport/lib/active_support/tagged_logging.rb
index 8561cba9f1..b069ac94d4 100644
--- a/activesupport/lib/active_support/tagged_logging.rb
+++ b/activesupport/lib/active_support/tagged_logging.rb
@@ -52,7 +52,9 @@ module ActiveSupport
def tags_text
tags = current_tags
- if tags.any?
+ if tags.one?
+ "[#{tags[0]}] "
+ elsif tags.any?
tags.collect { |tag| "[#{tag}] " }.join
end
end