One way is to add a class with the controller name somewhere in your HTML code.
<body class="<%= "controller_#{controller.name}" %>">
then declare some CSS classes in your style-sheet file
.controller_welcome {
background-color: yellow;
}
.controller_users {
background-color: pink
}
/* and so on */
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…