Setting bgcolor in Ruby. What's the proper way to do it? &lt;p style="background-color:#&lt;%= debate.bg_color %&gt;;" &gt;


be_color is a method of Debate that returns a string like 45FFFF.

Although it does what I want, this seems like a tremendously bad idea. What would be a better way to accomplish this? (I'm very new to both Ruby and Rails. And new-ish to web development in general.)
inline styles are bad practice

more elegant way would be assigning class to your  element based on debate properties, maybe creating a helper if this line is used frequently