diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2011-07-10 18:02:31 -0700 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2011-07-10 18:02:31 -0700 |
commit | c3732bfed01de49947dd0aedd8cc976128b7f5db (patch) | |
tree | 435b177788278fa545bea71a781d7831fd3dda1d /activerecord/lib | |
parent | 60076de1d416a68dc52804041f3c8586578acbd9 (diff) | |
parent | 618300f05a71bf728d9495c8f8226a8724c5a023 (diff) | |
download | rails-c3732bfed01de49947dd0aedd8cc976128b7f5db.tar.gz rails-c3732bfed01de49947dd0aedd8cc976128b7f5db.tar.bz2 rails-c3732bfed01de49947dd0aedd8cc976128b7f5db.zip |
Merge pull request #1823 from gnarg/master
Log instrumentation name for exists? queries
Diffstat (limited to 'activerecord/lib')
-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 422d89060b..283115a448 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 |