title: Body class for controller in Rails app
body: <p>Currently I have this in my layout:</p>
  
  <pre><code>&lt;body class="&lt;%= controller.controller_name %&gt;"&gt;
  </code></pre>
  
  <p>I want to add an additional class that will be the same for all actions in any controller where it's set, something like:</p>
  
  <pre><code>class SomeController &lt; ApplicationController
  
  body_class 'page'
  
  ...
  
  end
  
  
  class AnotherController &lt; ApplicationController
  
  body_class 'page'
  
  ...
  
  end
  </code></pre>
  
  <p>Which will result in:</p>
  
  <pre><code>&lt;body class="some page"&gt;
  
  &lt;body class="another page"&gt;
  </code></pre>
  
  <p>What would be the easiest way to achieve this? Can I use controller class variables for this?</p>