diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2016-09-30 13:58:58 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-30 13:58:58 -0400 |
commit | dc61db08b6858914ac083e11041b63e57ee04e65 (patch) | |
tree | b5a9513b40b4b81071e276b648d276fe44015ff8 /activerecord/test | |
parent | 8356dcac9b2e8239ade7ead15dee6ab08be605b7 (diff) | |
parent | 84d35da86c14767c737783cb95dd4624632cc1bd (diff) | |
download | rails-dc61db08b6858914ac083e11041b63e57ee04e65.tar.gz rails-dc61db08b6858914ac083e11041b63e57ee04e65.tar.bz2 rails-dc61db08b6858914ac083e11041b63e57ee04e65.zip |
Merge pull request #26584 from Shopify/cached-query-name
Preserve cached queries name in AS notifications
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/test_case.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/activerecord/test/cases/test_case.rb b/activerecord/test/cases/test_case.rb index 60ac3e08a1..8eddc5a9ed 100644 --- a/activerecord/test/cases/test_case.rb +++ b/activerecord/test/cases/test_case.rb @@ -125,12 +125,9 @@ module ActiveRecord end def call(name, start, finish, message_id, values) - sql = values[:sql] - - # FIXME: this seems bad. we should probably have a better way to indicate - # the query was cached - return if "CACHE" == values[:name] + return if values[:cached] + sql = values[:sql] self.class.log_all << sql self.class.log << sql unless ignore.match?(sql) end |