title: Rails: Conditionally setting CLASS atribute to a HTML tag
body: <p>my question concerns about Rails + HAML</p>
  
  <p>I would like to conditionally set a class atribute to a HTML tag. I figured out that the best way to do this is by setting controller variables that are used to set a class of the appropriate HTML tag.</p>
  
  <p>The only solutions I found googling tell me to use a conditional in HAML. But I don't think this is the best approach, since Views shouldn't have any logic control.</p>
  
  <p>So, how could I do this directly from the controller? Which are those controller variables that can set a class of a html tag? </p>