title: filtering false columns in rails model
body: <p>I have an amenities model that basically has a bunch of boolean columns.</p>
  
  <p>I want to display the True columns in views, so I would like to filter out the false columns at the model level.</p>
  
  <p>My initial thinking:</p>
  
  <pre><code># in model file
   def available
      a = {}
      self.attributes.each do |key, value|
        if value
          a[key] = value
        end
      end
      a
    end
  </code></pre>
  
  <p>This is not perfect since it gives me the id, created_at, and modified_at columns.</p>
  
  <p>I feel like there must be a better way to achieve this.</p>