diff options
author | Peter Boling <peter.boling@gmail.com> | 2015-07-17 13:23:59 -0700 |
---|---|---|
committer | Peter Boling <peter.boling@gmail.com> | 2015-07-17 13:23:59 -0700 |
commit | bec65fa261b9803c19edbbe9dc89836e1edf78c7 (patch) | |
tree | 62c238adfce951a29af7c9fd0be30d72db3d5e64 /activerecord/lib/active_record/errors.rb | |
parent | 2c79122c0bbd61dcef12b95c80e025490d5a9783 (diff) | |
download | rails-bec65fa261b9803c19edbbe9dc89836e1edf78c7.tar.gz rails-bec65fa261b9803c19edbbe9dc89836e1edf78c7.tar.bz2 rails-bec65fa261b9803c19edbbe9dc89836e1edf78c7.zip |
Improve sql logging coloration in `ActiveRecord::LogSubscriber`.
- Improves coloring for statements like:
# Become WHITE
SELECT * FROM (
SELECT * FROM mytable FOR UPDATE
) ss WHERE col1 = 5;
LOCK TABLE table_name IN ACCESS EXCLUSIVE MODE;
# Becomes RED
ROLLBACK
- Reinstates the coloration of the `payload[:name]`.
Instead of simple alternating colors, adds meaning:
- `MAGENTA` for `"SQL"` or `blank?` payload names
- `CYAN` for Model Load/Exists
- Introduces specs for sql coloration.
- Introduces specs for payload name coloration.
GH#20885
Diffstat (limited to 'activerecord/lib/active_record/errors.rb')
0 files changed, 0 insertions, 0 deletions