I’m trying to present different background images based on a css class that is named the same as the id of the item id but I can’t get it to actually work… Here’s what I have so far in my view:
<div class= "<% @city.id %>" style="background-color:white;">
And here’s what it’s rendering in the browser:
<div class style="background-color:white;">
What am I doing wrong?
You forgot the “=”, like so :