diff options
author | Arun Agrawal <arunagw@gmail.com> | 2011-10-21 15:12:00 +0530 |
---|---|---|
committer | Arun Agrawal <arunagw@gmail.com> | 2011-10-21 16:11:09 +0530 |
commit | c495cbcda94bec7a49a88631fc575cc04bde8e88 (patch) | |
tree | 73b041f522e473249d34b3f1b8ba8a9edfa834da /activesupport/lib | |
parent | af1b5c54cfb74caddd6ffab171d26da9a5c885d1 (diff) | |
download | rails-c495cbcda94bec7a49a88631fc575cc04bde8e88.tar.gz rails-c495cbcda94bec7a49a88631fc575cc04bde8e88.tar.bz2 rails-c495cbcda94bec7a49a88631fc575cc04bde8e88.zip |
Checking blank if tag might coming nil or blank
In log it should not show the empty array.
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/tagged_logging.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/tagged_logging.rb b/activesupport/lib/active_support/tagged_logging.rb index aff416a9eb..a59fc26d5d 100644 --- a/activesupport/lib/active_support/tagged_logging.rb +++ b/activesupport/lib/active_support/tagged_logging.rb @@ -1,3 +1,4 @@ +require 'active_support/core_ext/object/blank' require 'logger' module ActiveSupport @@ -18,7 +19,7 @@ module ActiveSupport def tagged(*new_tags) tags = current_tags - new_tags = Array.wrap(new_tags).flatten + new_tags = Array.wrap(new_tags).flatten.reject(&:blank?) tags.concat new_tags yield ensure |