aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-07-19 10:31:24 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-07-19 10:31:24 -0700
commitad4ef4226fd5d47252d30effa41a3ab2f55dbc8d (patch)
tree2a5ed341de04580ce2a82706cb77f1e916800003 /activerecord
parentdd4e81df86a119a32d52396c4ef856c856b7965a (diff)
downloadrails-ad4ef4226fd5d47252d30effa41a3ab2f55dbc8d.tar.gz
rails-ad4ef4226fd5d47252d30effa41a3ab2f55dbc8d.tar.bz2
rails-ad4ef4226fd5d47252d30effa41a3ab2f55dbc8d.zip
avoid const lookup. we know what these constants are in advance
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/log_subscriber.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/log_subscriber.rb b/activerecord/lib/active_record/log_subscriber.rb
index 71065f9908..89c79055fe 100644
--- a/activerecord/lib/active_record/log_subscriber.rb
+++ b/activerecord/lib/active_record/log_subscriber.rb
@@ -10,10 +10,10 @@ module ActiveRecord
sql = event.payload[:sql].squeeze(' ')
if odd?
- name = color(name, :cyan, true)
+ name = color(name, CYAN, true)
sql = color(sql, nil, true)
else
- name = color(name, :magenta, true)
+ name = color(name, MAGENTA, true)
end
debug " #{name} #{sql}"
@@ -29,4 +29,4 @@ module ActiveRecord
end
end
-ActiveRecord::LogSubscriber.attach_to :active_record \ No newline at end of file
+ActiveRecord::LogSubscriber.attach_to :active_record