diff options
author | Jon Guymon <jguymon@igicom.com> | 2011-06-22 13:41:34 -0700 |
---|---|---|
committer | Jon Guymon <jguymon@igicom.com> | 2011-06-22 13:41:34 -0700 |
commit | 618300f05a71bf728d9495c8f8226a8724c5a023 (patch) | |
tree | c4df1c24813ef4a3e90c08720f8ac0a806fb1aaf /activerecord/lib/active_record | |
parent | 6b3342d971d4e127dceb351ef983ca650167518e (diff) | |
download | rails-618300f05a71bf728d9495c8f8226a8724c5a023.tar.gz rails-618300f05a71bf728d9495c8f8226a8724c5a023.tar.bz2 rails-618300f05a71bf728d9495c8f8226a8724c5a023.zip |
Log instrumentation name for exists? queries
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/relation/finder_methods.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/relation/finder_methods.rb b/activerecord/lib/active_record/relation/finder_methods.rb index c6e8762b4a..89f75fe3b2 100644 --- a/activerecord/lib/active_record/relation/finder_methods.rb +++ b/activerecord/lib/active_record/relation/finder_methods.rb @@ -193,8 +193,8 @@ module ActiveRecord else relation = relation.where(table[primary_key].eq(id)) if id end - - connection.select_value(relation.to_sql) ? true : false + + connection.select_value(relation.to_sql, "#{name} Exists") ? true : false end protected |