title: Remove all html tags from attributes in rails
body: <p>I have a Project model and it has some text attributes, one is summary. I have some projects that have html tags in the summary and I want to convert that to plain text. I have this method that has a regex that will remove all html tags.</p>
  
  <pre><code>def strip_html_comments_on_data
    self.attributes.each{|key,value| value.to_s.gsub!(/(&lt;[^&gt;]+&gt;|&amp;nbsp;|\r|\n)/,"")}
  end
  </code></pre>
  
  <p>I also have a before_save filter</p>
  
  <pre><code>before_save :strip_html_comments_on_data
  </code></pre>
  
  <p>The problem is that the html tags are still there after saving the project. What am I missing?</p>
  
  <p>And, is there a really easy way to have that method called in all the models?</p>
  
  <p>Thanks,</p>
  
  <p>Nicolás Hock Isaza</p>