title: Comparing models Ruby on Rails
body: <p>I have one model call Permissions of about 60 columns where half of the column represents a boolean and half of them a text (:string) field.</p>
  
  <p>I would like to be able to compare 2 different objects of this model. </p>
  
  <p>The comparison will be able to present <strong>ONLY</strong> the <strong>True</strong> values of the 1st Object compared with the equivalent columns in the other object. <strong>Forget about the values containing or not text!</strong> </p>
  
  <p>For example:</p>
  
  <p><strong>Object 1:</strong></p>
  
  <pre><code>Permission:
      Read_disk :true
      Write_disk :true
      Modify_disk :true
      Delete_disk :true
      Every other permission FALSE or TEXT so I do not care about them. 
  </code></pre>
  
  <p><strong>Object 2:</strong></p>
  
  <pre><code>Permission:
      Read_disk :false     (*I care about that because it was true in object 1)
      Write_disk :false    (*I care about that because it was true in object 1)
      Modify_disk :true    (*I care about that because it was true in object 1)
      Delete_disk :true    (*I care about that because it was true in object 1)
      Every other might be TRUE or FALSE or TEXT but I do not care about them because those permissions were false in the object 1
  </code></pre>
  
  <p>In my view I would like to present this comparison showing only the true columns of <strong>Object 1</strong> and the equivalent fields of <strong>Object 2</strong></p>
  
  <p>Any suggestions? </p>
  
  <p>Thanks.</p>