This blog is part of our Rails 5 series.

In Rails 5, SQL statements have much more granular level of coloration .

INSERT statement

Font color for INSERT command is green

insert statement in green color

UPDATE and SELECT statement

Font color for UPDATE command is yellow and for SELECT it is blue.

update statement in yellow color

DELETE statement

Font color for DELETE command is red.

delete statement in red color

As you might have noticed from above that font color for transaction is cyan.

Rollback statement

Font color for Rollback transaction is red.

rollback statement in red color

Other statements

For custom SQL statements color is magenta and Model Load/exists color is cyan.

magenta