Browse files

avoid const lookup. we know what these constants are in advance

  • Loading branch information...
1 parent dd4e81d commit ad4ef4226fd5d47252d30effa41a3ab2f55dbc8d @tenderlove tenderlove committed Jul 19, 2010
Showing with 3 additions and 3 deletions.
  1. +3 −3 activerecord/lib/active_record/log_subscriber.rb
View
6 activerecord/lib/active_record/log_subscriber.rb
@@ -10,10 +10,10 @@ def sql(event)
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 @@ def logger
end
end
-ActiveRecord::LogSubscriber.attach_to :active_record
+ActiveRecord::LogSubscriber.attach_to :active_record

0 comments on commit ad4ef42

Please sign in to comment.